Files
src
build.gradle
Code
8 375
src/main/java/com/tbot/client/TBotPlugin.java
package com.tbot.client;
import com.tbot.client.command.TBotCommand;
import com.tbot.client.listener.TBotListener;
import com.tbot.client.manager.TBotManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public class TBotPlugin extends JavaPlugin {
private TBotManager tbotManager;
@Override
public void onEnable() {
saveDefaultConfig();
this.tbotManager = new TBotManager(this);
Bukkit.getPluginManager().registerEvents(new TBotListener(this), this);
getCommand("tbot").setExecutor(new TBotCommand(this));
getLogger().info("TBotClient has been enabled!");
}
@Override
public void onDisable() {
if (tbotManager != null) {
tbotManager.shutdown();
}
getLogger().info("TBotClient has been disabled!");
}
}