mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 03:05:17 +01:00
Fixed plugin listener
This commit is contained in:
parent
5df1dc2dfb
commit
f17f1fe5fb
@ -34,7 +34,7 @@ public class AuthMePluginListener implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPluginEnable(PluginEnableEvent event) {
|
public void onPluginEnable(PluginEnableEvent event) {
|
||||||
// Call the onPluginEnable method in the permissions manager
|
// Call the onPluginEnable method in the permissions manager
|
||||||
Core.getPermissionsManager().onPluginEnable(event);
|
this.instance.getPermissionsManager().onPluginEnable(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -51,16 +51,11 @@ public class AuthMePluginListener implements Listener {
|
|||||||
if(plugin == null)
|
if(plugin == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Make sure it's not Dungeon Maze itself
|
// Make sure it's not this plugin itself
|
||||||
if(plugin.equals(DungeonMaze.instance))
|
if(plugin.equals(this.instance))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Call the onPluginDisable method in the permissions manager
|
// Call the onPluginDisable method in the permissions manager
|
||||||
Core.getPermissionsManager().onPluginDisable(event);
|
this.instance.getPermissionsManager().onPluginDisable(event);
|
||||||
|
|
||||||
// Check if this plugin is hooked in to Dungeon Maze
|
|
||||||
if(Core.getApiController().isHooked(plugin))
|
|
||||||
// Unhook the plugin from Dungeon Maze and unregister it's API sessions
|
|
||||||
Core.getApiController().unhookPlugin(plugin);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user