mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2025-01-08 09:17:46 +01:00
Merge pull request #815 from goweiwen/unregister-permissions-on-reload
Unregister permissions on unload
This commit is contained in:
commit
df26bf3705
@ -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