use of me.robotoraccoon.stablemaster.commands.CoreCommand in project StableMaster by RobotoRaccoon.
the class StableMaster method onEnable.
/**
* Called once when the plugin is instantiated
*/
@Override
public void onEnable() {
plugin = this;
pluginFolder = getDataFolder();
stablesFolder = new File(pluginFolder + File.separator + "stables");
createDataFolders();
// Load in config data
StableUtil.loadConfigData();
// Register listeners
PluginManager pm = getServer().getPluginManager();
pm.registerEvents(new EntityDamageListeners(), this);
pm.registerEvents(new EntityDeathListener(), this);
pm.registerEvents(new EntityTameListener(), this);
pm.registerEvents(new PlayerInteractEntityListener(), this);
pm.registerEvents(new PlayerJoinListener(), this);
pm.registerEvents(new PlayerQuitListener(), this);
// Register commands
this.getCommand("stablemaster").setExecutor(new CoreCommand());
// Load all stables for players already online
for (Player p : this.getServer().getOnlinePlayers()) {
StableUtil.loadStable(p);
}
}
Aggregations