This guide assumes that you've used this template, and created your own repository based on it.
Let's now get started with your extension!
-
Locate the
gradle.propertiesfile, and change theid,name, andauthorfields there. Those will also be applied to the extension when that's being built. Note: The id must be lowercase, cannot start with a number, and cannot contain whitespaces. It may contain underscores (_).
The name may contain uppercase and lowercase characters, dots, underscores, and dashes. -
Rename the
org.geyser.extension.exampleidpackage to something more unique. For example,net.myname.extension.customappleswould work. -
Locate the
ExampleExtensionclass, which should be located in your new package (you should also rename it :p). You'll notice that it implements theExtensioninterface - that is required in order for Geyser to load your extension properly. For more info on how to proceed, take a look at the code in that class, or at our extension documentation. -
After changing your main class, don't forget to update the main class property in the
extensions.ymlfile. -
To build your extension: Run the
gradle buildcommand. The built extension will be located in thebuild/libs/folder.
Do you have further questions? Ask in the Geyser discord for help (#extensions channel)!