This guide will walk you through setting up your first Hytale mod using HytaleLoader.
Make sure to read this article from Hytale: https://support.hytale.com/hc/en-us/articles/45326769420827-Hytale-Server-Manual#tips-tricks
- Java 25
- Maven
HytaleLoaderinstalled locally (runmvn installin the library directory)HytaleServer.jar
-
Create a Maven Project: Create a new Maven project in your IDE.
-
Configure
pom.xml: Add dependencies forHytaleLoaderand theHytaleServer.<dependencies> <!-- Hytale Server (System scope or local repo) --> <dependency> <groupId>com.hypixel.hytale</groupId> <artifactId>HytaleServer</artifactId> <version>1.0.0</version> <scope>system</scope> <systemPath>${project.basedir}/../libs/HytaleServer.jar</systemPath> </dependency> <!-- HytaleLoader --> <dependency> <groupId>fr.hytale.loader</groupId> <artifactId>HytaleLoader</artifactId> <version>1.0.0</version> </dependency> </dependencies>
-
Shading: Since
HytaleLoaderis not part of the standard Hytale server, you must include it in your mod JAR using themaven-shade-plugin.<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.5.1</version> <executions> <execution> <phase>package</phase> <goals><goal>shade</goal></goals> </execution> </executions> </plugin>
- Extend
SimplePlugin: Create a class that extendsfr.hytale.loader.plugin.SimplePlugin. - Implement Constructor: You must provide a constructor matching
SimplePlugin(JavaPluginInit init). - Overrides: Implement
onEnable()andonDisable().
import fr.hytale.loader.plugin.SimplePlugin;
import com.hypixel.hytale.server.core.plugin.JavaPluginInit;
public class MyFirstMod extends SimplePlugin {
public MyFirstMod(JavaPluginInit init) {
super(init);
}
@Override
public void onEnable() {
getLogger().info("Mod enabled successfully!");
}
@Override
public void onDisable() {
getLogger().info("Mod disabled.");
}
}Create a manifest.json file in src/main/resources:
{
"Group": "com.yourname",
"Name": "MyFirstMod",
"Version": "1.0.0",
"Main": "com.yourname.MyFirstMod",
"Authors": [{"Name": "You"}]
}- Run
mvn package. - Copy the generated JAR (e.g.,
target/MyFirstMod-1.0.0.jar) to themodsfolder of your Hytale server. - Start the server!
Read Server for more information.