mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-08-26 07:22:56 +02:00
Fixed an issue with superperms where plugins define perms with
inheritance after the root perms
This commit is contained in:
parent
ab67d0e232
commit
0462026f33
|
@ -23,4 +23,5 @@ v 1.1:
|
|||
- Fix for GM not checking inheritance for known superperms nodes.
|
||||
- Optimized getAllPlayersPermissions and fixed pushing unknown perms to superperms.
|
||||
v 1.2:
|
||||
- Changed priority if Registered events to lowest.
|
||||
- Changed priority of Registered events to lowest.
|
||||
- Fixed an issue with superperms where plugins define perms with inheritance after the root perms
|
|
@ -18,6 +18,7 @@ public class BukkitPermsUpdateTask implements Runnable {
|
|||
public void run() {
|
||||
// Signal loaded and update BukkitPermissions.
|
||||
GroupManager.setLoaded(true);
|
||||
GroupManager.BukkitPermissions.collectPermissions();
|
||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||
|
||||
GroupManager.logger.info("Bukkit Permissions Updated!");
|
||||
|
|
|
@ -93,7 +93,7 @@ public class BukkitPermissions {
|
|||
manager.registerEvent(Event.Type.PLUGIN_DISABLE, serverListener, Event.Priority.Normal, plugin);
|
||||
}
|
||||
|
||||
private void collectPermissions() {
|
||||
public void collectPermissions() {
|
||||
registeredPermissions.clear();
|
||||
for (Plugin bukkitPlugin : Bukkit.getServer().getPluginManager().getPlugins()) {
|
||||
for(Permission permission : bukkitPlugin.getDescription().getPermissions())
|
||||
|
@ -134,8 +134,8 @@ public class BukkitPermissions {
|
|||
Boolean value;
|
||||
for (Permission permission : registeredPermissions) {
|
||||
value = worldData.getPermissionsHandler().checkUserPermission(user, permission.getName());
|
||||
|
||||
attachment.setPermission(permission, value);
|
||||
if (value == true)
|
||||
attachment.setPermission(permission, value);
|
||||
}
|
||||
|
||||
// Add any missing permissions for this player (non bukkit plugins)
|
||||
|
|
Loading…
Reference in New Issue
Block a user