Minecraft GUI Shop Plugin

If you've ever played on a popular Minecraft server, chances are good that you've interacted with a GUI shop. Typically accessed with a chat command, these seemingly simple plugins use inventory screens to display a shop to the player where they can buy or sell different resources.

Examples of shop plugins

GUI shops are among the most popular types of plugins—and for good reason! From the player's perspective, it can provide a sleek and convenient way to get rewarded for the resources you've gathered or gain access to ones you are lacking.

For server owners, however, these plugins can be such a headache to set up. The configuration can be confusing and often poorly documented, which becomes exhausting over the course of defining the many menus and items that a Minecraft shop can require. Worst of all, in my opinion: almost all of the good options are not free, making it difficult, if not expensive, to find a plugin that has all the features you're looking for.

So what if someone went through the popular shop plugins to learn what things people liked about them, and used that knowledge to design a simple and straightforward, yet powerful shop plugin? And what if it was completely free? That's exactly what I did!

What makes newtShop special?

Ease of configuration

The main priority with newtShop was to make configuring and customizing the shop as easy and painless as possible. I focused a lot on trying to simplify item definitions in the config files and document them well. My hope was that if you did end up needing to hop into the files, you would never feel overwhelmed. For example, let's take a look at a sample shop category:

1name: '&aCustom Category' 2id: 'custom' 3display-item: 4 display-type: ITEM 5 material: BRICKS 6slot: 12 7sort-type: FILL 8items: 9 BEDROCK: 10 buy: 10.0 11 sell: 5.0 12 item: 13 type: NORMAL 14 material: BEDROCK

It's pretty straightforward, you have just 8 lines to completely customize how the category appears in the GUI, and defining a basic item is as simple as adding its name and a couple of prices. Combine this with a thorough documentation site, and I think it's a pretty smooth experience.

But it doesn't stop there! A trend I was noticing in other plugins was an emphasis on allowing players to configure plugins without having to leave Minecraft and dive into configuration files. And newtShop did not become an exception! I set up a few in-game commands to do most of the customization you would need to do without ever needing to open a .yml file. Holding an item and running the command /shopmanage add <category> <item_name> <buy> <sell> [display_name] would allow you to add items to the shop in-game. With other commands to modify prices, most shop tasks can be completed right from Minecraft.

Automation is awesome

This may shock you, but by far my favorite thing to do in Minecraft is build farms to automate tasks and optimize their production. Because of that, my favorite feature I created for newtShop is hands down Sell Chests. These are custom chests that will periodically sell any items inside and add the profits to your account. That's pretty cool on its own, but this feature really shines when you combine it with Hoppers.

Hoppers are blocks in Minecraft that allow you to transfer items into a container, such as a chest. You'll frequently see Hoppers used with automatic farms to collect the items produced by the farm. But what if you feed your farm into a Sell Chest from newtShop? Not only is your farm automatically collecting items, but it's now automatically selling those items—passive income!

Technical challenges

There's a big part of newtShop that I haven't mentioned yet: backwards compatibility. There's many reasons as to why, but there are a lot of players that prefer to play on certain Minecraft versions. This can sometimes make it tricky to run a server, because if you're running an old Minecraft version, you may have to sort through old plugins that are no longer maintained. If I was going to make an easy and great plugin, I didn't want to have it gated off from some players just because they prefer an older version.

I made sure newtShop was fully compatible with every Minecraft version all the way back to 1.8 (for context, at the time of release Minecraft was on 1.15). This was tricky to get the hang of, because I didn't want to have multiple downloads and require players to make sure they got the correct one. I wanted one plugin file that could be dropped in any supported version and work as expected. I ended up using Maven to manage version-specific code for newtShop, such as handling item names that change between versions.

Lessons learned

newtShop was such a fun project, and a huge learning experience in a lot of ways. This was the first time I really experienced a project having a decent sized active userbase, and that came with a lot of lessons. At first I was so caught up in the excitement that I made a habit of overextending myself in addressing user requests and issues. There were days that I would wake up early in the morning and be glued to my computer, adding features and helping people with problems one on one until the early hours of the next morning rolled around. It was a blast and my quick response and eagerness to help really meant a lot to those using the plugin, but it was extremely taxing mentally.

Without a doubt, newtShop still remains my favorite project I've worked on, and I look forward to one day coming back with version 3! 🎉 In the meantime, feel free to check out the video overview for newtShop 2.0 if you're curious for an in-depth look at the plugin.