Search in sources :

Example 1 with SettingsHandler

use of com.bgsoftware.wildchests.handlers.SettingsHandler 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 ********");
}
Also used : ProvidersHandler(com.bgsoftware.wildchests.handlers.ProvidersHandler) ChestsHandler(com.bgsoftware.wildchests.handlers.ChestsHandler) CommandsHandler(com.bgsoftware.wildchests.command.CommandsHandler) SettingsHandler(com.bgsoftware.wildchests.handlers.SettingsHandler) ChunksListener(com.bgsoftware.wildchests.listeners.ChunksListener) BlockListener(com.bgsoftware.wildchests.listeners.BlockListener) InventoryListener(com.bgsoftware.wildchests.listeners.InventoryListener) DataHandler(com.bgsoftware.wildchests.handlers.DataHandler) PlayerListener(com.bgsoftware.wildchests.listeners.PlayerListener)

Aggregations

CommandsHandler (com.bgsoftware.wildchests.command.CommandsHandler)1 ChestsHandler (com.bgsoftware.wildchests.handlers.ChestsHandler)1 DataHandler (com.bgsoftware.wildchests.handlers.DataHandler)1 ProvidersHandler (com.bgsoftware.wildchests.handlers.ProvidersHandler)1 SettingsHandler (com.bgsoftware.wildchests.handlers.SettingsHandler)1 BlockListener (com.bgsoftware.wildchests.listeners.BlockListener)1 ChunksListener (com.bgsoftware.wildchests.listeners.ChunksListener)1 InventoryListener (com.bgsoftware.wildchests.listeners.InventoryListener)1 PlayerListener (com.bgsoftware.wildchests.listeners.PlayerListener)1