As the name says, Trade allows players to trade items with each other. Without the need of complicated commands!
Originally, the only way for players to trade items is by dropping them and picking them up; a method very prone to cheating. This plugin introduces a new and safer way to trade, using few commands and a user interface specifically designed for this purpose.
The trading interface is based on the chest one. Three coloured wool blocks are placed in the first row; representing buttons and an indicator. And the sticks act as separators, dividing the grid into two equal parts that are labelled by the top bar. Although this interface looks a little primitive, it does everything it is supposed to do without any problems.
To start a transaction, players have to request another player first. This can be done in two ways: either by right clicking them or by using the command /trade <playername>,
Accepting a transaction goes pretty much the same: firstly this can be achieved by right clicking the requester while pressing shift, or else by using the command /trade accept <playername>. If the transaction is not accepted within ten seconds, it will be cancelled automatically. The length of this time-out can be changed if necessary.
As you can see, the plugin can be used entirely commandless; making it blend in with the game seamlessly.
The trading process itself is pretty straight forward. All that has to be done is dragging the items players would like to trade from their inventory into their segment of the trading grid; using the wool buttons as follows:
- Green: accept transaction
- Red: cancel transaction
- Grey: indicates whether or not the other player has already accepted the transaction
Once both players have accepted a transaction the trading window will be closed automatically and the newly acquired items will be placed in their inventories.
Installing the plugin on your server is fairly easy. If this is your first time, simply follow these steps and your players will be enjoying this plugin in no time!
- Download the latest version of Trade from here or here.
- Place the "Trade.jar" file in the "plugins" folder, located in your server's main directory.
- Start or reload your server.
- Check if the "Trade" folder has been added to the "plugins" folder successfully.
- Open the configuration files found in the previously mentioned folder to configure the plugin.
- Restart the server to load your new configuration.
- Enjoy your newly installed plugin!
Using the included configuration files you can easily customise the plugin to suit your needs. The interface, for example, can be changed in a few ways: such as changing the amount of rows or even using custom lay-outs that allow players to trade currency.
Besides the interface, the transaction process can be configured extensively as well; including the following aspects:
- Changing time-out length
- Being able to trade cross-world and cross-gamemode
- Allowing players to trade only when they see each other
- Allowing players to ignore trade requests - handy for pvp battles and the like
- Enabling players to trade with each other by right-clicking or by commands
We also had the chance to hold an interview with Josvth, developer of Trade. Read on to learn more about the plugin's development process!
What inspired you to begin this project?
Well I regularly browse through the API documentation of Bukkit searching for things I could use for new plugins. When I saw that you could create virtual inventories I thought that if I could link the left side of one inventory to the right side of the other one I could create a very intuitive way to trade blocks and items with each other.
How was your plugin received by the community at its initial public release?
When I first uploaded my plugin as an alpha I didn't add any screen shots. So the first reactions on the plugin were that people didn't believe I created a way to Trade without having to type complicated commands. After I uploaded some screen shot of how it actually looked like people started to get more interest in the plugin.
One of the first requests I got was to add economy support, so players could for example trade money for blocks. I prefer having no economy system on servers since I find that money doesn't belong in Minecraft and that items and blocks on itself should be traded. However after more people requested the addition and I started to see the benefits of it I decided to add the feature to the plugin.
Roughly how much time did you spend on finishing the first working version of Trade?
I made the first version of Trade in a week or so. I remember having a week vacation when I made it. But to get it to the state it is now I spent a lot of spare hours.
Have you encountered any problems during development and, if any, how did you handle them?
Dupe bugs... Dupe bugs everywhere. No seriously in a few days after I released the plugin players found ways to quadruple their diamonds in seconds. Luckily I did warn the users that since the plugin was still in alpha stage dupe bugs could likely exist. I fixed most of the bugs by rewriting the way the two virtual inventories are linked together.
What was your favourite development tool for this project?
I would have to say Github. Not just for this project but for all bigger projects especially the ones I worked on with multiple developers. Github allows you to keep track of the changes you ( and others ) made for a certain application. It also also allows you to create branches of your existing code allowing you to experiment around without having to constantly make backups of existing code. Or the risk that you break something you can't revert.
Have you learned anything new from this project?
With every project I make I learn. Simply because you run into new problems you have to solve. The biggest thing I learned about this project is creating a structured plugin.
What stage of Trade’s development process did you enjoy most?
The stage where I had a lot of time working on it while having a lot of idea's for the plugin. It just feels great if you can add new things and show them to your community and see them using it. Lately I have little time to work a lot on the plugin because of my studies and most of the development I do is bugfixing and keeping the plugin updated for newer versions of Bukkit.
And what is your favourite aspect of the plugin itself?
The intuitive way to trade items with this plugin is its power. It's very simple and safe to use, without having to remember complicated commands.
Are you currently working on any other plugins or updates?
I'm currently developing plugins with a few other developers for a Game of Thrones server called Winds of Winter (website). I'm currently assigned to create the war system of the server which is a very challenging and fun thing to do. We launch in one month so we have to work hard to make that deadline.
In addition to your Minecraft plugins, have you ever released any custom content for other games?
No not yet. If I have some more spare time I will look into developing something for Planetside 2 a free to play shooter MMO. I want to create like an app where you can see the stats of your character or something like that.
Besides your own creations, what are some of your favourite plugins from other developers and why?
I like plugins that add new elements to the gameplay of Minecraft like McMMO does with new skills, Citizens with adding NPCs and Towny Advanced does by adding towns.
Do you have any advice for other potential plugin developers?
When you first start programming don't feel overrun by things you don't understand yet. Search on Youtube and Google for Java and Bukkit Plugin tutorials and start with something simple. And if you have something that actually works try to understand why it works and what's the logic behind it. If you know the logic behind a piece of code you've found you can apply that logic in some other situation.
All in all, Trade is an excellent addition; the ability to use it without commands makes it both easy to use for everyone and a good choice for role playing servers, as it blends in with the game nicely. Of course it is not a bad choice for other servers either! Thanks to the configuration possibilities you can easily change the plugin to your liking. Lastly, don't be put off by the looks of the interface! Although it may seem quite primitive at first sight, it works flawlessly.
Many thanks to josvth for creating this plugin!
Thanks to MadPixel for the Minecrafter font.