Minecraft Modding: Slab Client Mod and AmitySMP Plugin
12/17/2023
By Walker McGilvary
Recently I've dived into Minecraft server and client modding, where I developed a PvP client mod called Slab Client and a server plugin named AmitySMP. This journey has been instrumental in enhancing my Java programming skills, particularly in mastering Java's Gradle system for dependencies and building, as well as Maven for the server plugin.
Slab Client: A PvP Mod for Minecraft
Slab Client is a PvP client mod designed to enhance the Minecraft PvP experience. One of the key features I implemented was a dynamic GUI system. Here's a snippet from the GuiMenu class, showcasing the implementation:
This code demonstrates the GUI rendering and event handling in the Slab Client. The drawScreen method is responsible for rendering the GUI elements, while mouseClicked handles user interactions.
AmitySMP: A Bukkit Plugin for Minecraft Servers
AmitySMP is a simple PaperMC plugin I developed for a small survival world in Minecraft. It includes essential commands like /sethome, /home, /broadcast, and more. I used Maven for building this plugin and learned to manage dependencies effectively. Here's a snippet from the AmityEvents class, which handles various player events:
This code is part of the event handling system in AmitySMP. It customizes player join/leave messages and chat formatting, enhancing the server experience.
Discord Integration and Persistent Data
For AmitySMP, I also integrated Discord functionalities and set up a config file for server administrators. This allowed for seamless communication between the Minecraft server and a Discord channel. Additionally, using BukkitObjectInputStream and BukkitObjectOutputStream, I implemented a simple database system to store player home locations, which was crucial for the /sethome and /home commands.
Conclusion
Overall, these projects have significantly improved my understanding of Minecraft client and server modifications. They have also deepened my knowledge of Java programming, particularly in using Gradle and Maven for build management. The technical challenges encountered and overcome in these projects have been invaluable in enhancing my software development skills.
For those interested in exploring the code or contributing, you can find the repositories for these projects on GitHub: