The API is fully documented, the other features will be documented in the following days.
What is Bazaar?
The Bazaar is kind of like a real stock market, with supply and demand, and everyone can take part in it. This allows for people to flip items on the Bazaar, and make money. This is like Auction House flipping, except that the items will get sold eventually when the price that you wish to pay is given.
What is Flipping?
Flipping is the act of buying an item and then selling it for a higher price to make a profit, like getting a Carrot for 1,000 coins and then selling it for 1,500 coins, as you make a profit of 500 coins. With the Bazaar, you have to wait for the selling price to get higher than what you bought it for.
Buy Order:
A Buy Order signifies that a player is willing to buy a specific number of items at a specific price per unit or lower. Restrictions can be configure in the config.yml. Depending on the unit price, your Buy Order will be filled faster or slower (the higher the unit price, the faster it will be filled).
Sell Offer:
A Sell Offer signifies that a player is willing to sell a specific number of items at a specific price per unit or more. Restrictions can be configure in the config.yml. Depending on the unit price, your Sell Offer will be filled faster or slower (the lower the unit price, the faster it will be filled).
Features:
- Sell Offers
- Sync Data across multiple Servers (FULLY IMPLEMENTED)
- Buy Orders
- Buy Orders can fill Sell Offers and vice versa
- Buy & Sell instantly
- Categories & items per each category (5 categories a 18 sub categories a 9 items = 810 items max)
- Full custom item support (nbt, texture, enchantments,...)
- Everything is customizable (Includes messages, menus, items, categories, ...)
- You can use bazaar like a shop
- Page system for main menu
Spoiler: Create Sell Offer
Creating a Sell Offer with 64 diamonds
Spoiler: Cancel Sell Offer
Cancelling a Sell Offer with 64 diamonds
Spoiler: Create Buy Order
Creating a Buy Order for 64 diamonds
Spoiler: Cancel Buy Order
Cancelling a Buy Order for 64 diamonds
Spoiler: Enquiry fills Enquiry
A Sell Offer/Buy Order fills a Buy Order/Sell Offer if the unit price of the Sell Offer is lower than or equals the unit price of the Buy Order. If a Buy Order and a Sell Offer fill each other but their unit price does not match, take a look at "Unused Coins" to see what happens.
Spoiler: Unused Coins
A Sell Offer/Buy Order fills a Buy Order/Sell Offer if the unit price of the Sell Offer is lower than or equals the unit price of the Buy Order. If a Buy Order and a Sell Offer fill each other but their unit price does not match, the Buy Order can claim unused coins: (BuyOrder#unitPrice - SellOffer#unitPrice) * amount
Spoiler: Buy Instantly
Buying 64 diamonds instantly
Spoiler: Sell Instantly
Selling 64 diamonds instantly
Spoiler: API
Configuration:
NOTE: Only Bazaar.jar in the downloaded ZIP File is a Minecraft plugin. Read below on how to use the other one.
Spoiler: Multiple server setup
Video:
Text:
Download Sockets and put the jar file into a new folder.
Note that this is NOT a minecraft plugin but a executable jar file.
Run the jar with java -jar socket_server.jar and stop the server with the command stop.
A new folder called plugins will be created.
Unpack the Bazaar.zip file. Two new files will appear: Bazaar.jar and Bazaar-Socket.jar.
Move the BazaarSocketPlugin.jar into the plugins folder.
Start the server again with
java -jar socket_server.jar -h 127.0.0.1
Messages like Enabling Bazaar v?.?.?, Loading Enquiries from Files... & Loaded total of 0 Enquiries indicate that it was successfully loaded.
Now go to your minecraft server plugins folder and open the file config.yml in the Bazaar folder. Set socket-support to true. The serverName is for identification and debugging to show which server connected/disconnected. You now have to check the console of the server and look at the first few lines. There you will find a line containing Port. This value and the one in the config.yml file in the Bazaar folder in the mincraft server plugins folder have to match. address has to be set to your pc name or localhost (unless you specified it otherwise (f.e. if you have multiple machines)). Now start the minecraft server and you will see that new messages appear. It will try to connect to the socket server and if it's successfull you will see the following messages:
Code (Text):
[Bazaar] Connecting to server socket...
[Bazaar] Connected to ?:?
[Bazaar] Sending BazaarConnectPacket
[Bazaar] Connection accepted!
[Bazaar] Starting BazaarThreadPool
The last message indicates that it has connected to the server socket and everything is working. If an error occurs, make sure the server socket is running and the port and address match. If you still did not find the issue contact me on Discord