Skip to content

Developer Hello World

ludgart edited this page Nov 10, 2020 · 1 revision

Developer Hello World

After the successful installation, we can start with a simple Hello World example.

Extend from our API

public class Main extends CorePlugin {

Implement the required methods

@Override
public void onEnable() {
  super.onEnable();
}

@Override
public void registerCommand() {
}

@Override
public void registerListener() {
}

@Override
public void buildConfig() {
}

@Override
public void reload() {
}

Configure onEnable()

@Override
public void onEnable() {
  super.onEnable();

  # The material in the /core inventory list
  this.setDisplayItem(CompatibleMaterial.OAK_SIGN.getMaterial());
  # The help command in the /core inventory
  this.setHelpCommand("test");
  # The name of the plugin
  this.setPluginName("Test");
}

Plugin.yml

name: Test
main: org.example.test.Main
author: ludgart
version: 0.0.1
api-version: 1.13
website: https://minecraft.plugin.zocker.pro/

Compile and Run

Compile the plugin and move the compiled jar into your /plugins directory and start the server
Join your server and typ the command /core
Now it should display your plugin.
Your plugin is ready for more stuff!

Information

Server Owner

Developer

Clone this wiki locally