Files
src
.gitignore
build.gradle
Code
22 1,527
src/main/java/com/custompotatoes/CustomPotatoes.java
package com.custompotatoes;
import com.custompotatoes.command.PotatoCommand;
import com.custompotatoes.listener.PotatoListener;
import com.custompotatoes.manager.ConfigManager;
import com.custompotatoes.manager.PotatoManager;
import org.bukkit.plugin.java.JavaPlugin;
public class CustomPotatoes extends JavaPlugin {
private ConfigManager configManager;
private PotatoManager potatoManager;
@Override
public void onEnable() {
this.configManager = new ConfigManager(this);
this.potatoManager = new PotatoManager(this);
configManager.loadConfigs();
potatoManager.loadPotatoes();
getCommand("custompotatoes").setExecutor(new PotatoCommand(this));
getServer().getPluginManager().registerEvents(new PotatoListener(this), this);
getLogger().info("CustomPotatoes has been enabled!");
getLogger().info("Loaded " + potatoManager.getPotatoes().size() + " potato types!");
}
@Override
public void onDisable() {
getLogger().info("CustomPotatoes has been disabled!");
}
public ConfigManager getConfigManager() {
return configManager;
}
public PotatoManager getPotatoManager() {
return potatoManager;
}
}