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);
}
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);
}
Aggregations