use of com.bgsoftware.wildchests.listeners.InventoryListener in project WildChests by BG-Software-LLC.
the class WildChestsPlugin method onEnable.
@Override
public void onEnable() {
plugin = this;
log("******** ENABLE START ********");
if (!loadNMSAdapter()) {
setEnabled(false);
return;
}
chestsManager = new ChestsHandler();
settingsHandler = new SettingsHandler(this);
dataHandler = new DataHandler(this);
providersHandler = new ProvidersHandler(this);
getServer().getPluginManager().registerEvents(new BlockListener(this), this);
getServer().getPluginManager().registerEvents(new ChunksListener(this), this);
getServer().getPluginManager().registerEvents(new InventoryListener(this), this);
getServer().getPluginManager().registerEvents(new PlayerListener(this), this);
CommandsHandler commandsHandler = new CommandsHandler(this);
getCommand("chests").setExecutor(commandsHandler);
getCommand("chests").setTabCompleter(commandsHandler);
Locale.reload(this);
loadAPI();
NotifierTask.start();
if (updater.isOutdated()) {
log("");
log("A new version is available (v" + updater.getLatestVersion() + ")!");
log("Version's description: \"" + updater.getVersionDescription() + "\"");
log("");
}
log("******** ENABLE DONE ********");
}
Aggregations