mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-06 21:18:03 +02:00
Added a tidy error message for invalid permission entries in
GlobalGroups.
This commit is contained in:
parent
89c41b0508
commit
64af5b465d
@ -103,4 +103,5 @@ v 1.8:
|
||||
- Catch NullPointerErrors generated by blank permission nodes.
|
||||
- Removed '- bukkit.command' form the globalgroups permission nodes.
|
||||
v 1.9:
|
||||
- Optimize populating Bukkit perms so we no longer calculate the child nodes (Bukkit already does this).
|
||||
- Optimize populating Bukkit perms so we no longer calculate the child nodes (Bukkit already does this).
|
||||
- Added a tidy error message for invalid permission entries in GlobalGroups.
|
@ -125,8 +125,12 @@ public class GlobalGroups {
|
||||
|
||||
if (element != null)
|
||||
if (element instanceof List) {
|
||||
for (String node : (List<String>) element) {
|
||||
newGroup.addPermission(node);
|
||||
try {
|
||||
for (String node : (List<String>) element) {
|
||||
newGroup.addPermission(node);
|
||||
}
|
||||
} catch (ClassCastException e) {
|
||||
throw new IllegalArgumentException("Invalid permission node for global group: " + groupName);
|
||||
}
|
||||
} else if (element instanceof String) {
|
||||
newGroup.addPermission((String) element);
|
||||
|
Loading…
Reference in New Issue
Block a user