Initial project setup with Hytale plugin template
Add a minimal, ready-to-use Hytale plugin template including Gradle build scripts, GitHub Actions CI workflow, example plugin class, configuration and manifest files, and supporting documentation. This setup provides modern build tooling, automated server testing, and best practices for plugin development.
This commit is contained in:
54
src/main/java/com/example/templateplugin/TemplatePlugin.java
Normal file
54
src/main/java/com/example/templateplugin/TemplatePlugin.java
Normal file
@@ -0,0 +1,54 @@
|
||||
package com.example.templateplugin;
|
||||
|
||||
/**
|
||||
* Main plugin class.
|
||||
*
|
||||
* TODO: Implement your plugin logic here.
|
||||
*
|
||||
* @author YourName
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public class TemplatePlugin {
|
||||
|
||||
private static TemplatePlugin instance;
|
||||
|
||||
/**
|
||||
* Constructor - Called when plugin is loaded.
|
||||
*/
|
||||
public TemplatePlugin() {
|
||||
instance = this;
|
||||
System.out.println("[TemplatePlugin] Plugin loaded!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when plugin is enabled.
|
||||
*/
|
||||
public void onEnable() {
|
||||
System.out.println("[TemplatePlugin] Plugin enabled!");
|
||||
|
||||
// TODO: Initialize your plugin here
|
||||
// - Load configuration
|
||||
// - Register event listeners
|
||||
// - Register commands
|
||||
// - Start services
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when plugin is disabled.
|
||||
*/
|
||||
public void onDisable() {
|
||||
System.out.println("[TemplatePlugin] Plugin disabled!");
|
||||
|
||||
// TODO: Cleanup your plugin here
|
||||
// - Save data
|
||||
// - Stop services
|
||||
// - Close connections
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plugin instance.
|
||||
*/
|
||||
public static TemplatePlugin getInstance() {
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
5
src/main/resources/config.json
Normal file
5
src/main/resources/config.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"pluginName": "TemplatePlugin",
|
||||
"version": "1.0.0",
|
||||
"debugMode": false
|
||||
}
|
||||
19
src/main/resources/manifest.json
Normal file
19
src/main/resources/manifest.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"Group": "TemplatePlugin",
|
||||
"Name": "TemplatePlugin",
|
||||
"Version": "1.0.0",
|
||||
"Description": "A Hytale plugin template",
|
||||
"Authors": [
|
||||
{
|
||||
"Name": "YourName",
|
||||
"Email": "your.email@example.com",
|
||||
"Url": "https://your-website.com"
|
||||
}
|
||||
],
|
||||
"Website": "https://github.com/yourusername/hytale-plugin-template",
|
||||
"Main": "com.example.templateplugin.TemplatePlugin",
|
||||
"ServerVersion": "*",
|
||||
"Dependencies": {},
|
||||
"OptionalDependencies": {},
|
||||
"DisabledByDefault": false
|
||||
}
|
||||
Reference in New Issue
Block a user