Search in sources :

Example 1 with ScoreboardStack

use of net.dzikoysk.funnyguilds.element.ScoreboardStack in project FunnyGuilds by FunnyGuilds.

the class FunnyGuilds method onEnable.

@Override
public void onEnable() {
    new ScoreboardStack(this).start();
    new Manager().start();
    new MetricsCollector(this).start();
    AsynchronouslyRepeater repeater = AsynchronouslyRepeater.getInstance();
    repeater.start();
    PluginManager pluginManager = Bukkit.getPluginManager();
    PluginConfig config = Settings.getConfig();
    pluginManager.registerEvents(new GuiActionHandler(), this);
    pluginManager.registerEvents(new EntityDamage(), this);
    pluginManager.registerEvents(new EntityInteract(), this);
    pluginManager.registerEvents(new PlayerChat(), this);
    pluginManager.registerEvents(new PlayerDeath(), this);
    pluginManager.registerEvents(new PlayerJoin(this), this);
    pluginManager.registerEvents(new PlayerKick(), this);
    pluginManager.registerEvents(new PlayerLogin(), this);
    pluginManager.registerEvents(new PlayerQuit(), this);
    if (config.regionsEnabled) {
        pluginManager.registerEvents(new BlockBreak(), this);
        pluginManager.registerEvents(new BlockIgnite(), this);
        pluginManager.registerEvents(new BlockPlace(), this);
        pluginManager.registerEvents(new BucketAction(), this);
        pluginManager.registerEvents(new EntityExplode(), this);
        pluginManager.registerEvents(new HangingBreak(), this);
        pluginManager.registerEvents(new HangingPlace(), this);
        pluginManager.registerEvents(new PlayerCommand(), this);
        pluginManager.registerEvents(new PlayerInteract(), this);
        if (config.eventMove) {
            pluginManager.registerEvents(new PlayerMove(), this);
        }
        if (config.eventPhysics) {
            pluginManager.registerEvents(new BlockPhysics(), this);
        }
    }
    this.eventManager.enable();
    this.patch();
    Version.isNewAvailable(getServer().getConsoleSender(), true);
    PluginHook.init();
    FunnyLogger.info("~ Created by FunnyGuilds Team ~");
}
Also used : GuiActionHandler(net.dzikoysk.funnyguilds.element.gui.GuiActionHandler) EventManager(net.dzikoysk.funnyguilds.system.event.EventManager) ConcurrencyManager(net.dzikoysk.funnyguilds.concurrency.ConcurrencyManager) Manager(net.dzikoysk.funnyguilds.data.Manager) DescriptionManager(net.dzikoysk.funnyguilds.util.DescriptionManager) PluginManager(org.bukkit.plugin.PluginManager) AsynchronouslyRepeater(net.dzikoysk.funnyguilds.system.AsynchronouslyRepeater) PluginManager(org.bukkit.plugin.PluginManager) MetricsCollector(net.dzikoysk.funnyguilds.util.metrics.MetricsCollector) ScoreboardStack(net.dzikoysk.funnyguilds.element.ScoreboardStack) PluginConfig(net.dzikoysk.funnyguilds.data.configs.PluginConfig)

Aggregations

ConcurrencyManager (net.dzikoysk.funnyguilds.concurrency.ConcurrencyManager)1 Manager (net.dzikoysk.funnyguilds.data.Manager)1 PluginConfig (net.dzikoysk.funnyguilds.data.configs.PluginConfig)1 ScoreboardStack (net.dzikoysk.funnyguilds.element.ScoreboardStack)1 GuiActionHandler (net.dzikoysk.funnyguilds.element.gui.GuiActionHandler)1 AsynchronouslyRepeater (net.dzikoysk.funnyguilds.system.AsynchronouslyRepeater)1 EventManager (net.dzikoysk.funnyguilds.system.event.EventManager)1 DescriptionManager (net.dzikoysk.funnyguilds.util.DescriptionManager)1 MetricsCollector (net.dzikoysk.funnyguilds.util.metrics.MetricsCollector)1 PluginManager (org.bukkit.plugin.PluginManager)1