Files
src
build.gradle
settings.gradle
Code
8 491
src/main/java/com/kodari/michaelglove/MichaelJacksonPlugin.java
package com.kodari.michaelglove;
import org.bukkit.plugin.java.JavaPlugin;
public final class MichaelJacksonPlugin extends JavaPlugin {
private MJItems items;
private EmoteManager emotes;
@Override
public void onEnable() {
this.items = new MJItems(this);
this.emotes = new EmoteManager(this, items);
getServer().getPluginManager().registerEvents(new MJListener(this, items, emotes), this);
MJCommand command = new MJCommand(this, items, emotes);
if (getCommand("mj") != null) {
getCommand("mj").setExecutor(command);
getCommand("mj").setTabCompleter(command);
}
}
@Override
public void onDisable() {
if (emotes != null) {
emotes.cancelAll();
}
}
}