It all began when I was streaming on Twitch. I played Minecraft and my friends wanted to join. It started from a basic setup to this massive project.
For those of you who don’t know, Minecraft is basically online Lego with blocks. It’s the best selling game of all time. The gameplay is simple, yet complex. Players managed to build computing systems within the game. Yes … I know. Impressive!
Anyway, let’s get back to the point. Take a look at my server here: amongdemons.com/minecraft/
You can tell right from the start that the project is made out of 2 parts: a website component and the java server itself. They are situated on separate computers connected through a common MySQL database.
Let’s go through some of the important features and specifically the things I changed the most.
Account Creation and Whitelist
My main purpose was to let everyone play, including the non-premium players. The problem is that usernames can change before entering the game. You can imagine how easily players can grief and avoid punishment.
The solution I came up with is to whitelist the server. Nobody can move when they join the game. Everyone needs to create an account on the website and then use the custom command: /login [password]
It’s not perfect, but it feels enough for now. Everything a player owns is connected to his email. I know they can have multiple email accounts, but if I ban someone, he loses server currency, claimed land and all the items he gathered.
If at some point in time, the situation gets out of control, I can set all the accounts inactive on register and manually approve new players.
I already had the domain amongdemons.com and it was kind of fitting that the Minecraft world is full of monsters. To keep the theme going the main currency of this world is called souls.
What can you do with souls?
- You can convert into levels. Each soul will give you an in-game level if you use /souls convert [number]
- Give other players souls. All you have to do is use the custom command /souls give [name] [amount]
- On the website’s home page you can see a live map. It is a 1 on 1 representation of the in game world. By using souls you can add markers with custom messages. Just login to the game and type /addmarker [message]
- Trade them for kits. Go to the website and open the Kits section. Everything you see was coded without using any framework or CMS.
How can you get souls?
- Register: after creating an account, you get an email. If you read the email and click on the verification link, you’ll get 60.
- Passive: everyone get a reward every 10 minutes. You just need to be online and play the game.
- Vote for the server and you get 30. This refreshes every 24 hours.
- Referral: a customized referral link is available in your account and if your friend verifies his email you both get 30 souls.
- Donations: you get 45 souls for every USD. There’s a bonus if you pay with crypto. I accept ETH, DAI or BTC. Everything is powered by Coinbase Commerce at the moment.
The map component was already made by the Dynmap team. I only made some small adjustments to the style of its elements. I also used jQuery and PHPmailer.
Everything else was coded by me and Andreea from scratch. This includes login, register, forgot password, account, server info, changelog, web shop, voting system, referral system, donations and purchase history.
In the backend I used PHP and a MySQL database. I also needed some cURL calls to get data from the payment APIs and from the voting website.
Minecraft Server and Spigot Plugins
Spigot is an open source project that extends the default Minecraft server. It allows a ton of customization and enables developers to create plugins.
There’s a huge database with plugins. Check it out here. From almost 50000, I’ve selected a few to help my vision. Here’s what I use:
- Vault – this is a generally accepted interface for economy. It has a set of functions that allow all other plugins to communicate with each other.
- GriefPrevention – as you might expect, this keeps the server safe from ill intended people. Players can claim an area of land where only them and their trusted friends can build, fight or interact with objects.
- Harbor – In default Minecraft everyone must sleep in order to skip the night. Harbor lets me configure that to 50% or any other percent.
- DiscordSRV – I’ve setup an Among Demons discord server. With this plugin I connected the in-game chat to a specific channel from Discord. So all messages from game are visible in that channel and the other way around. Whispers are an exception. Those are not transmitted.
- Dynmap – as you can see on the website home page, we have a live interpretation of the in game map. Dynmap updates this map whenever different triggers take place.
Of course, if you spend some time in game or check out our info page, you’ll notice that there are features not covered by these plugins.
That’s because I coded my own custom Spigot plugin. To sum it up, I programmed the following things:
- MySQL database provider for Vault’s Economy interface
- Login command connected to the website users
- disabled movement and interaction before login
- Anti-flood system before login
- custom commands for soul interaction (server currency)
- passive rewards for online players
- custom command that adds cost in souls to Dynmap markers
- item claim on login or on a custom command from a database buffer. This is used after players buy kits from the website shop.
You can read more about it here.
Donation System with PayPal and Cryptocurrencies
I wanted to reward the players that support our Minecraft server and I created a donation page. For each dollar, they will get souls in return.
Because I strongly believe in blockchain technology, I’m doing my part in promoting it. Everyone that uses crypto for donations will receive more souls per dollar.
As you’d expect, everything is automated. Depending on what method you choose, the USD to souls calculator will be updated accordingly. After you hit the submit button, I connect to the PayPal API or Coinbase API and you’ll be redirected to their interface where you complete the payment.
I’m quite proud of the crypto payments. I’ve never done anything like that. It was a learning experience and I’ll definitely use more in the future.
Currently I accept Ether, Dai and Bitcoin. In that order. I fully support and trust the Ethereum ecosystem. As for other options, maybe Monero or something similar in the future. We’ll see.
Thoughts and Suggestions
I learned a LOT while coding for this Minecraft server. I’m glad I did it. It turned out great. I’m proud of it. It made me re-test my Java skills and it also made me research blockchain payments.
I intend to keep this server free to play and as fair as possible for the players. You can check it out here.
If you have any questions or feedback, leave a comment.
Thanks for checking out my project.