Minecraft for relaxation

I’ve recently started playing minecraft with my girlfriend and her brother again. It’s a great game which allows me to unwind from the stress of working on a master thesis. Or so I thought. As it turns out, there are a lot of things that give me ideas for projects, which would make the game more fun. And then, I’ve got a new project. Thanks brain.

The beginning

When setting up the server, I wanted it to not use ressources all the time. After a bit of searching, I found Minecraft Server Hibernation. It’s a programm that detects when no one is playing and shuts down the server. This saves a lot of ressources. I’ve set it up and it worked great.

Until I started adding plugins to the server. One of them was EssentialsX, which altered the format of the output of the /list command. Of course, this broke msh. So I did, what every normal person would do. Clone the repo and go on a hunt for the bug. I’ve never used go before, so everything was kind of weird for me. But I managed to find the bug and fix it. Gekigek was very nice about the mistakes/bad code I wrote and proposed some changes.

Now that the pull request is merged, I can use the project again. It just took some hours that were spent on a project that I did not need to do.

Now I can play!

We played on the server for a while and I didn’t have to worry about anything. Until we found Allays. Cute little ghosts that follow and help you. They are absolutely adorable. And they get easily lost. We spent a lot of time looking for a lost one and were really sad at the thought of loosing them. So, once again I started searching for a plugin which helps with this.

I found nothing. So, there we go again. I’ve only written basic minecraft plugins before, but this should not be too different.


I want the plugin to do three things:

  • Make Allays invulnearble, so they do not die in the heat of the moment
  • Increase the range at which they follow you, so they do not get lost so easily
  • Disable despawning, which normally should not happen, but just in case

Luckily, these were all easy problems. The class Allay has a function called setInvulnerable(), which does exactly what you think it does. Nice.

They also have the attribute GENERIC_FOLLOW_RANGE, which can be set to a higher value. For the last point, a function called setRemoveWhenFarAway() can be used. This whole process was surprisingly easy and allowed us to play minecraft without worrying about our Allays.

And now?

Right now, we are not really actively playing. But we want to keep going, and when we do I am sure that I will find new, small projects which will be added to this list.