mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-23 18:55:11 +01:00
Fixed plugin listener
This commit is contained in:
parent
5df1dc2dfb
commit
f17f1fe5fb
@ -34,7 +34,7 @@ public class AuthMePluginListener implements Listener {
|
||||
@EventHandler
|
||||
public void onPluginEnable(PluginEnableEvent event) {
|
||||
// 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)
|
||||
return;
|
||||
|
||||
// Make sure it's not Dungeon Maze itself
|
||||
if(plugin.equals(DungeonMaze.instance))
|
||||
// Make sure it's not this plugin itself
|
||||
if(plugin.equals(this.instance))
|
||||
return;
|
||||
|
||||
// Call the onPluginDisable method in the permissions manager
|
||||
Core.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);
|
||||
this.instance.getPermissionsManager().onPluginDisable(event);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user