Search in sources :

Example 1 with ConfigValues

use of com.eintosti.buildsystem.config.ConfigValues in project BuildSystem by Trichtern.

the class BuildSystem method onEnable.

@Override
public void onEnable() {
    this.getConfig().options().copyDefaults(true);
    this.saveConfig();
    this.configValues = new ConfigValues(this);
    initClasses();
    if (!initVersionedClasses()) {
        getLogger().severe("BuildSystem does not support your server version: " + version);
        getLogger().severe("Disabling plugin...");
        this.setEnabled(false);
        return;
    }
    registerCommands();
    registerTabCompleter();
    registerListeners();
    registerStats();
    registerExpansions();
    performUpdateCheck();
    worldManager.load();
    settingsManager.load();
    spawnManager.load();
    Bukkit.getOnlinePlayers().forEach(pl -> {
        getSkullCache().cacheSkull(pl.getName());
        Settings settings = settingsManager.createSettings(pl);
        settingsManager.startScoreboard(pl, settings);
        noClipManager.startNoClip(pl, settings);
    });
    Bukkit.getConsoleSender().sendMessage(ChatColor.RESET + "BuildSystem ยป Plugin " + ChatColor.GREEN + "enabled" + ChatColor.RESET + "!");
}
Also used : ConfigValues(com.eintosti.buildsystem.config.ConfigValues) Settings(com.eintosti.buildsystem.object.settings.Settings)

Aggregations

ConfigValues (com.eintosti.buildsystem.config.ConfigValues)1 Settings (com.eintosti.buildsystem.object.settings.Settings)1