mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2025-02-03 05:51:38 +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();
|
deleteAllInstances();
|
||||||
HandlerList.unregisterAll(this);
|
HandlerList.unregisterAll(this);
|
||||||
getServer().getScheduler().cancelTasks(this);
|
getServer().getScheduler().cancelTasks(this);
|
||||||
|
DPermission.unregister();
|
||||||
loaded = false;
|
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