Plugin development: Difference between revisions
mNo edit summary |
Noggisoggi (talk | contribs) (General cleanup of draft) |
||
| Line 1: | Line 1: | ||
[[Category:Server internals]] [[Category:Guides]] | [[Category:Server internals]] [[Category:Guides]] | ||
{{Notice|This is currently a draft, and may contain inaccurate or incomplete information.}} | {{Notice|This is currently a draft, and may contain inaccurate or incomplete information.}} | ||
In the context of a Minecraft server, plugins are [https://en.wikipedia.org/wiki/JAR_(file_format) Java archives] that extend the functionality of a server. They can add new commands, modify gameplay elements and whatnot; creating plugins is a great way to introduce fun features to players.</br> | |||
<hr> | |||
Please note that this guide will '''not''' cover how to make plugins and assumes you have a baseline understanding of [https://en.wikipedia.org/wiki/Java_(programming_language) Java] and.<br> | |||
It will however cover what requirement plugins need to satisfy to be added to the server; see [[Developing for the Server|developing for the server]] for a more general overview. | |||
== General requirements == | |||
These are generally good practices to follow when developing.<br> | |||
Because the infrastructure team will have to review your code, it is vital to <b>keep code readable from a glance</b> to not waste their time.</br> | |||
This can be done by using descriptive variables and methods (method "<code>SPSM</code>" -> "<code>sendPlayerScoreMessage</code>" and player "<code>a1</code>" -> "<code>player</code>".</br> | |||
Consider wrapping a line of code to the next line if it gets too long, so that the reviewer doesn't have to constantly scroll left and right.</br> | |||
These practices allow other developers to modify your project easily.</br> | |||
<b>Reliability</b> is also another vital point - when making a plugin, look for any stack traces that print to the console and resolve them as not to spam the console and alongside that, make sure your plugin doesn't break any existing systems, cause lag, overuse available memory, perform any malicious action, or crash the server.</br> | |||
=== RetroMC specific requirements === | |||
* When handling player data you should always utilize UUID's from [https://github.com/search?q=repo%3Aretromcorg%2FProject-Poseidon%20uuid&type=code Project Poseidon] to enable player data persistence between name changes. | |||
=== RetroMC | |||
When handling player data you should | |||
Revision as of 06:36, 22 October 2025
ℹ️ Notice: This is currently a draft, and may contain inaccurate or incomplete information.
In the context of a Minecraft server, plugins are Java archives that extend the functionality of a server. They can add new commands, modify gameplay elements and whatnot; creating plugins is a great way to introduce fun features to players.
Please note that this guide will not cover how to make plugins and assumes you have a baseline understanding of Java and.
It will however cover what requirement plugins need to satisfy to be added to the server; see developing for the server for a more general overview.
General requirements
These are generally good practices to follow when developing.
Because the infrastructure team will have to review your code, it is vital to keep code readable from a glance to not waste their time.
This can be done by using descriptive variables and methods (method "SPSM" -> "sendPlayerScoreMessage" and player "a1" -> "player".
Consider wrapping a line of code to the next line if it gets too long, so that the reviewer doesn't have to constantly scroll left and right.
These practices allow other developers to modify your project easily.
Reliability is also another vital point - when making a plugin, look for any stack traces that print to the console and resolve them as not to spam the console and alongside that, make sure your plugin doesn't break any existing systems, cause lag, overuse available memory, perform any malicious action, or crash the server.
RetroMC specific requirements
- When handling player data you should always utilize UUID's from Project Poseidon to enable player data persistence between name changes.