mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-26 02:58:03 +01:00
Merge branch 'master' into release
This commit is contained in:
commit
270533652b
@ -117,4 +117,5 @@ v 1.9:
|
|||||||
- Changed addSubGroup() to only add the group if it doesn't already exist (no need to update an already existing group).
|
- Changed addSubGroup() to only add the group if it doesn't already exist (no need to update an already existing group).
|
||||||
- addSubGroup now returns a boolean for success/failure.
|
- addSubGroup now returns a boolean for success/failure.
|
||||||
- '/manuaddsub' now correctly reports if it was able to add the sub group.
|
- '/manuaddsub' now correctly reports if it was able to add the sub group.
|
||||||
- Allow negation to the * permission node when populating superperms.
|
- Allow negation to the * permission node when populating superperms.
|
||||||
|
- Fix trying to modify an unmodifiable collection breaking superperms.
|
@ -153,41 +153,42 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface {
|
|||||||
// Allow * node to populate ALL perms in Bukkit.
|
// Allow * node to populate ALL perms in Bukkit.
|
||||||
if (perms.contains("*")) {
|
if (perms.contains("*")) {
|
||||||
permArray.addAll(GroupManager.BukkitPermissions.getAllRegisteredPermissions(includeChildren));
|
permArray.addAll(GroupManager.BukkitPermissions.getAllRegisteredPermissions(includeChildren));
|
||||||
perms.remove("*");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String perm : perms) {
|
for (String perm : perms) {
|
||||||
|
|
||||||
boolean negated = false;
|
if (!perm.equalsIgnoreCase("*")) {
|
||||||
if (perm.startsWith("-"))
|
boolean negated = false;
|
||||||
negated = true;
|
if (perm.startsWith("-"))
|
||||||
|
negated = true;
|
||||||
if (!permArray.contains(perm)) {
|
|
||||||
permArray.add(perm);
|
|
||||||
|
|
||||||
if ((negated) && (permArray.contains(perm.substring(1))))
|
if (!permArray.contains(perm)) {
|
||||||
permArray.remove(perm.substring(1));
|
permArray.add(perm);
|
||||||
|
|
||||||
if (includeChildren) {
|
if ((negated) && (permArray.contains(perm.substring(1))))
|
||||||
|
permArray.remove(perm.substring(1));
|
||||||
Map<String, Boolean> children = GroupManager.BukkitPermissions.getAllChildren((negated ? perm.substring(1) : perm), new HashSet<String>());
|
|
||||||
|
if (includeChildren) {
|
||||||
if (children != null) {
|
|
||||||
if (negated) {
|
Map<String, Boolean> children = GroupManager.BukkitPermissions.getAllChildren((negated ? perm.substring(1) : perm), new HashSet<String>());
|
||||||
|
|
||||||
// Remove children of negated nodes
|
if (children != null) {
|
||||||
for (String child : children.keySet())
|
if (negated) {
|
||||||
if (children.get(child))
|
|
||||||
if (permArray.contains(child))
|
// Remove children of negated nodes
|
||||||
permArray.remove(child);
|
for (String child : children.keySet())
|
||||||
|
if (children.get(child))
|
||||||
} else {
|
if (permArray.contains(child))
|
||||||
|
permArray.remove(child);
|
||||||
// Add child nodes
|
|
||||||
for (String child : children.keySet())
|
} else {
|
||||||
if (children.get(child))
|
|
||||||
if ((!permArray.contains(child)) && (!permArray.contains("-" + child)))
|
// Add child nodes
|
||||||
permArray.add(child);
|
for (String child : children.keySet())
|
||||||
|
if (children.get(child))
|
||||||
|
if ((!permArray.contains(child)) && (!permArray.contains("-" + child)))
|
||||||
|
permArray.add(child);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
lib/bukkit.jar
BIN
lib/bukkit.jar
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user