if (world == null || world.equals("")) {
System.err.println("[bPermissions] Some silly developer is checking for a blank world!");
return "BLANKWORLD";
}
WorldPermissions perms = wpm.getPermissionSet(world).getWorldPermissions();
User us = perms.getUser(player);
if(us.contains(valueToGet))
return us.getValue(valueToGet);
String value = "";
int priority = -1;
for (Permission perm : us.getEffectivePermissions()) {
if (perm.isTrue()) {
String name = perm.name();
String[] index = name.split("\\.", 3);
if (index.length == 3 && index[0].equals(valueToGet)) {
int pr = Integer.parseInt(index[1]);
if (pr > priority) {
value = index[2];
priority = pr;
}
}
}
}
us.setValue(valueToGet, value);
return value;
}