Search in sources :

Example 31 with PluginManager

use of org.bukkit.plugin.PluginManager in project Essentials by drtshock.

the class EssentialsXMPP method onEnable.

@Override
public void onEnable() {
    instance = this;
    final PluginManager pluginManager = getServer().getPluginManager();
    ess = (IEssentials) pluginManager.getPlugin("Essentials");
    if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) {
        LOGGER.log(Level.WARNING, tl("versionMismatchAll"));
    }
    if (!ess.isEnabled()) {
        this.setEnabled(false);
        return;
    }
    final EssentialsXMPPPlayerListener playerListener = new EssentialsXMPPPlayerListener(ess);
    pluginManager.registerEvents(playerListener, this);
    users = new UserManager(this.getDataFolder());
    xmpp = new XMPPManager(this);
    ess.addReloadListener(users);
    ess.addReloadListener(xmpp);
}
Also used : PluginManager(org.bukkit.plugin.PluginManager)

Example 32 with PluginManager

use of org.bukkit.plugin.PluginManager in project acidisland by tastybento.

the class ASkyBlock method restartEvents.

public void restartEvents() {
    final PluginManager manager = getServer().getPluginManager();
    lavaListener = new LavaCheck(this);
    manager.registerEvents(lavaListener, this);
    // Enables warp signs in ASkyBlock
    warpSignsListener = new WarpSigns(this);
    manager.registerEvents(warpSignsListener, this);
}
Also used : PluginManager(org.bukkit.plugin.PluginManager) LavaCheck(com.wasteofplastic.acidisland.listeners.LavaCheck)

Aggregations

PluginManager (org.bukkit.plugin.PluginManager)32 Test (org.junit.Test)12 World (org.bukkit.World)5 Plugin (org.bukkit.plugin.Plugin)5 MultiverseWorld (com.onarandombox.MultiverseCore.api.MultiverseWorld)3 Location (org.bukkit.Location)3 Listener (org.bukkit.event.Listener)3 Essentials (com.earth2me.essentials.Essentials)2 MultiverseCore (com.onarandombox.MultiverseCore.MultiverseCore)2 MVWorldManager (com.onarandombox.MultiverseCore.api.MVWorldManager)2 LavaCheck (com.wasteofplastic.acidisland.listeners.LavaCheck)2 File (java.io.File)2 Method (java.lang.reflect.Method)2 IEssentials (net.ess3.api.IEssentials)2 Event (org.bukkit.event.Event)2 EventException (org.bukkit.event.EventException)2 EventExecutor (org.bukkit.plugin.EventExecutor)2 JavaPlugin (org.bukkit.plugin.java.JavaPlugin)2 User (com.earth2me.essentials.User)1 Metrics (com.earth2me.essentials.metrics.Metrics)1