Broker introduces a new and innovative trading system that does not require a client mod such as Spoutcraft.
This plugin gives players the ability to buy and sell their items through a server-wide trading network that can be accessed in various ways. The advantages of such a system are that players no longer have to open up their own shop, although this is still possible, and that it is easier for buyers to find what they are are looking for.
Listing an item can be done easily by using the /broker sell command while holding said item. Once a player has put an item up for sale, it will appear in the Broker shop. The interface of this shop is based on that of the chest; and although it looks very similar, it can hold much more items thanks to a clever browsing system.
Buyers can browse through the shop by clicking the pieces of paper placed in the bottom row. Each piece of paper represents a separate page and each page can hold up to 45 items.
To buy an item, players simply have to double click it. After which the shopping interface closes and the amount to be paid gets shown in the chat window. All they have to do to complete the order is specifying the amount of items they would like to buy.
As mentioned before, the Broker store can be accessed in different ways; such as executing a command, right clicking a villager while crouching or activating a sign labelled [Broker].
Additionally, players are able to buy from one another the same way as from a villager. The difference with the other methods is that only the items sold by the player you are trading with will appear in the shop. If players are too far away from each other they can also access each other's personal shop by placing a sign labelled [Broker] combined with the player's name on the fourth line.
All in all, Broker is an excellent trading plugin. Not only does it offer a convenient system for buying and selling items, but it also makes trading more realistic due to interaction with NPCs and other players.
Lastly, we also had the chance to hold an interview with ellbristow, the creator of Broker. Be sure to continue reading to learn more about the development process behind this plugin!
What motivated you to start this project?
Obviously my main motivation was my love of Minecraft, but being a big fan of RPGs and MMOs I alway felt Minecraft needed a reliable way for players to be able to trade the items they found, whilst providing an element of competition between players.
Thanks to plugins like iConomy and Vault the currency side of things was already in place, but other trading plugins always seemed overly technical, clunky or just not in keeping with the theme of Minecraft. The idea of Broker was to plug the hole. I'd already created virtual chest inventories for ChestBank, so Broker seemed like the perfect way to extend that idea.
Broker was originally going to be exclusive to my "Ellitopia" server, mainly because I never expected to be able to make it portable to other servers... but once I got started on it I realised how big it could be for the community and did what I could to get it working.
How was your plugin received by the community at its first public release?
The first ever comment the plugin received on BukkitDev was "I have been waiting for a plugin like this!". I think that says it all. The community seemed to be waiting for a plugin that did what I was doing with Broker. Positive comments flooded in right from the word go, my personal favourite beign from samgr472, "This. Is. Genius.". :D
Approximately how much time did it take to complete the first working version of Broker?
Thanks to the work I had already done on ChestBank, work on Broker was actually relatively quick. I started it around 25th March 2012 and the first alpha release hit BukkitDev on the 31st. From what I can remember I worked pretty solidly on it in that time, and spent many hours staring blankly at lines of code wondering why it didn't work.
Did you come across any challenges during development and, if any, how did you handle them?
The initial challenge with this plugin was getting the plugin to actually do anything. The event triggers in Bukkit that handled inventory clicks were relatively new, and creating virtual inventories that were prepopulated with specific items in a specific order was not straight forward. Many of the first bug reports related to items not showing up or showing up when they weren't supposed to, and I had to be very careful to ensure there were no duplication bugs or items being lost into the void of the virtual chest. Once those issues were out of the way, the initial development was relatively straight forward... at least until people started complaining that their players couldn't work out how to use it. That was when I readdressed the buying process and took out one of the steps to make it easier to use... at which point Mojang decided to introduce Item Meta Data, which threw a big spanner in the works (parts of which is still rattling around in the cogs somewhere).
What was your favourite development tool for this project?
NetBeans. No doubt about it. Having a text editor that highlights your mistakes before you realise you've made them, and predicts the line of code you're trying to type as you go along is absolute gold. Other packages exist that do the same thing of course, but NetBeans, for me, was easy to use and ticked all the boxes.
Have you learned anything new from this project?
What stage of Broker’s development process did you enjoy most?
Testing the finished product (if you can call it that). Because I have my own production server it was great to be able to fire up this plugin and introduce my players to it. The response I got was great and the plugin has developed really well thanks to the feedback I've received from my players (and of course from other server owners).
And what is your favourite aspect of the plugin itself?
When you type /broker it's got my name on it! :)
But apart from that, I think my most favourite part is one of the new features I added that allows trading by crouching and right clicking another player. It has really helped to give Minecraft an MMO RPG feel, which was the original idea for the plugin. The idea behind the new feature was to give players a private shop that only sold their items, but using the Broker interface system. I also made it possible to achieve the same thing using signs, but that was more of a side-effect of the player-to-player trade system I was aiming for.
Are you currently working on any other plugins or updates?
Thanks to the introduction of Item Meta Data, all my plugins need some work. With 17 active plugins on BukkitDev as well as a few others that are exclusive to the "Ellitopia" server, I certainly have my work cut out keeping them up to date. I do have plans for some other plugins, and it's my intention to run some live-streams as I code them to give other people an insight into how plugins are developed. I'm open to any suggestions the community have for plugins they would like to see, and WATCH, being developed, so if people want to look me up and get in touch I'm always listening.
In addition to your Minecraft plugins, have you ever released any custom content for other games?
I've never developed mods for any other games. As I said before I'm a web developer by trade so my knowledge and experience has always been designing web based system for businesses etc. I have however always been a gamer and have always dreamed of being a game-dev, so creating plugins was a great way for me to try my hand at it. Doing so has given me the confidence to start development of my own online game over at macrometro.com. It's in the very early stages of development, but it's an idea I've had for over 8 years and have never got around to working on. If I get enough time and support I plan to make it into something epic!
Besides your own creations, what are some of your favourite plugins from other developers and why?
I have a lot of respect for the guys who created plugins like Towny. Towny is a great plugin and, considering when it was first developed, showed a lot of ingenuity. I have developed MyChunk, which was intended to be a simpler approach to the Towny idea, and the headaches I've had developing it has only strengthened my respect for the Towny Devs... in fact my first ever line of code written for a Minecraft plugin was to suggest a new feature for Towny, which went on to be implemented.
I also love the idea behind the Citizens plugin, but the times I have implemented it into my own server it has never quite stuck or fit in with the players.
Do you have any advice for other potential plugin developers?
Google and YouTube are your friends. I learnt the basics of coding Minecraft plugins from YouTube and constantly mash my keyboard at Google trying to find answers to bugs and puzzles i come across during the development process.
Having a clear goal in mind is vital. If you start a plugin but don't really know where you want it to go it won't work and you will end up giving up with it. I've done it on more than one occasion (see my Adventure project for a perfect example).
Don't let other people tell you what your plugin should or shouldn't do. I'm not saying you should ignore feedback, but if you find yourself implementing features you don't really want in the plugin you will lose interest and your plugin will fall inactive. it's far better to have a simple plugin that works than a complicated plugin with so many bugs you never get to actually play any Minecraft.
Finally, steal other peoples code. No wait.... "research" other people's plugins to see how they get around things like performance issues, data storage, and things like that. Don't steal their ideas... if you're going to do that it's better to fork their plugin and offer your insight to make THEIR plugin better. Why make something from scratch that already exists!
Many thanks to ellbristow for creating this plugin and for participating in our interview!
Thanks to MadPixel for the Minecrafter font.