mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-08 07:36:42 +02:00
Ignore stupid plugins which add empty permission nodes.
This commit is contained in:
@@ -214,6 +214,10 @@ public class BukkitPermissions {
|
|||||||
List<String> result = new ArrayList<String>();
|
List<String> result = new ArrayList<String>();
|
||||||
|
|
||||||
for (String key : permList) {
|
for (String key : permList) {
|
||||||
|
/*
|
||||||
|
* Ignore stupid plugins which add empty permission nodes.
|
||||||
|
*/
|
||||||
|
if (!key.isEmpty()) {
|
||||||
String a = key.charAt(0) == '-' ? key.substring(1) : key;
|
String a = key.charAt(0) == '-' ? key.substring(1) : key;
|
||||||
Map<String, Boolean> allchildren = GroupManager.BukkitPermissions.getAllChildren(a, new HashSet<String>());
|
Map<String, Boolean> allchildren = GroupManager.BukkitPermissions.getAllChildren(a, new HashSet<String>());
|
||||||
if (allchildren != null) {
|
if (allchildren != null) {
|
||||||
@@ -235,6 +239,7 @@ public class BukkitPermissions {
|
|||||||
if (!result.contains(key))
|
if (!result.contains(key))
|
||||||
result.add(key);
|
result.add(key);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user