Search in sources :

Example 1 with ConfigValues

use of com.eintosti.buildsystem.util.ConfigValues in project BuildSystem by einTosti.

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.util.ConfigValues) Settings(com.eintosti.buildsystem.object.settings.Settings)

Aggregations

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