Plugin development

From RetroMC
Revision as of 02:22, 22 October 2025 by Garsooon (talk | contribs) (Category)
Jump to navigation Jump to search

Creating Plugins for the Server

Overview

Plugins are custom jar's that extend the functionality of the server. They can add new commands, modify gameplay, ect. Creating plugins is a great way to get changes and new and fun features to players.
This guide will not cover how to make plugins an assumes you have a baseline understanding of Java needed to make said plugins. It will however cover what plugins should generally have to be added to the server.
For a general overview of developing for the server you can check out, Developing for the Server.

General Requirements

Generally, Plugins must be Readable & Reliable.

Readability is a huge thing because Infrastructure will have to review your code, as to not waste their time it is key to keep code readable from a glance.
Generally this can be done by using descriptive variables and methods. Instead of calling your method "SPSM" use "sendPlayerScoreMessage" or instead of defining a player as "a1" use "player".
When a line of code gets long consider wrapping the text to the next line so the reviewer doesn't have to constantly scroll left and right.
These are simple good coding practices that keep your code easily readable when being approved along with allowing other developers to add to your project easily.

Reliability is also another key thing, when making a plugin look for any stacktraces that print to the console and resolve them as not to spam the console. Along with that make sure your plugin doesn't break any existing systems, cause lag, or crash the server.

RetroMC Specific Requirements

When handling player data you should, at all times utilize UUID's from Project Poseidon[1]. This is to persist player data between name changes.