mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-21 10:52:01 +00:00
Fix for GM not checking inheritance for known superperms nodes.
This commit is contained in:
parent
62e1710607
commit
1d38b72835
|
@ -19,4 +19,5 @@ v 1.1:
|
||||||
- manulistp now accepts an additional + to list ALL Superperms effective permissions (/manulistp <name> +).
|
- manulistp now accepts an additional + to list ALL Superperms effective permissions (/manulistp <name> +).
|
||||||
- manucheckp also outputs superperms results.
|
- manucheckp also outputs superperms results.
|
||||||
- Removed superperms update on plugins unloading. Unneeded and created undesired lag on shutdown.
|
- Removed superperms update on plugins unloading. Unneeded and created undesired lag on shutdown.
|
||||||
- Added a BukkitPermsUpdateTask to only update superperms once on a load/reload.
|
- Added a BukkitPermsUpdateTask to only update superperms once on a load/reload.
|
||||||
|
- Fix for GM not checking inheritance for known superperms nodes.
|
|
@ -16,8 +16,6 @@
|
||||||
|
|
||||||
package org.anjocaido.groupmanager.permissions;
|
package org.anjocaido.groupmanager.permissions;
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.io.StringWriter;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -28,7 +26,6 @@ import java.util.Set;
|
||||||
import org.anjocaido.groupmanager.GroupManager;
|
import org.anjocaido.groupmanager.GroupManager;
|
||||||
import org.anjocaido.groupmanager.data.User;
|
import org.anjocaido.groupmanager.data.User;
|
||||||
import org.anjocaido.groupmanager.dataholder.OverloadedWorldHolder;
|
import org.anjocaido.groupmanager.dataholder.OverloadedWorldHolder;
|
||||||
import org.anjocaido.groupmanager.utils.PermissionCheckResult;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -134,15 +131,10 @@ public class BukkitPermissions {
|
||||||
}
|
}
|
||||||
|
|
||||||
// find matching permissions
|
// find matching permissions
|
||||||
PermissionCheckResult permissionResult;
|
|
||||||
Boolean value;
|
Boolean value;
|
||||||
for (Permission permission : registeredPermissions) {
|
for (Permission permission : registeredPermissions) {
|
||||||
permissionResult = worldData.getPermissionsHandler().checkFullUserPermission(user, permission.getName());
|
value = worldData.getPermissionsHandler().checkUserPermission(user, permission.getName());
|
||||||
if (permissionResult.resultType.equals(PermissionCheckResult.Type.FOUND))
|
|
||||||
value = true;
|
|
||||||
else
|
|
||||||
value = false;
|
|
||||||
|
|
||||||
attachment.setPermission(permission, value);
|
attachment.setPermission(permission, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,19 +153,6 @@ public class BukkitPermissions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
player.recalculatePermissions();
|
player.recalculatePermissions();
|
||||||
|
|
||||||
/*
|
|
||||||
// List perms for this player
|
|
||||||
GroupManager.logger.info("Attachment Permissions:");
|
|
||||||
for(Map.Entry<String, Boolean> entry : attachment.getPermissions().entrySet()){
|
|
||||||
GroupManager.logger.info(" " + entry.getKey() + " = " + entry.getValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
GroupManager.logger.info("Effective Permissions:");
|
|
||||||
for(PermissionAttachmentInfo info : player.getEffectivePermissions()){
|
|
||||||
GroupManager.logger.info(" " + info.getPermission() + " = " + info.getValue());
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> listPerms(Player player) {
|
public List<String> listPerms(Player player) {
|
||||||
|
|
Loading…
Reference in a new issue