mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Unregister permissions on unload
Should allow the plugin to be reloaded
This commit is contained in:
parent
3a810bda54
commit
3198855544
@ -234,6 +234,7 @@ public class DungeonsXL extends DREPlugin implements DungeonsAPI {
|
||||
deleteAllInstances();
|
||||
HandlerList.unregisterAll(this);
|
||||
getServer().getScheduler().cancelTasks(this);
|
||||
DPermission.unregister();
|
||||
loaded = false;
|
||||
}
|
||||
|
||||
|
@ -213,4 +213,13 @@ public enum DPermission {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters the permissions.
|
||||
*/
|
||||
public static void unregister() {
|
||||
for (DPermission permission : values()) {
|
||||
Bukkit.getPluginManager().removePermission(permission.getNode());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user