This might fix problems people have been having with dinnerperms.

Dieser Commit ist enthalten in:
zml2008 2011-10-30 15:16:00 -07:00
Ursprung 8e0539adf1
Commit d5328e34ba

Datei anzeigen

@ -50,8 +50,6 @@ public class DinnerPermsResolver implements PermissionsResolver {
return false; // Permissions are only registered for online players return false; // Permissions are only registered for online players
} }
switch (internalHasPermission(perms, permission)) { switch (internalHasPermission(perms, permission)) {
case 0:
break;
case -1: case -1:
return false; return false;
case 1: case 1:
@ -60,8 +58,6 @@ public class DinnerPermsResolver implements PermissionsResolver {
int dotPos = permission.lastIndexOf("."); int dotPos = permission.lastIndexOf(".");
while (dotPos > -1) { while (dotPos > -1) {
switch (internalHasPermission(perms, permission.substring(0, dotPos + 1) + "*")) { switch (internalHasPermission(perms, permission.substring(0, dotPos + 1) + "*")) {
case 0:
break;
case -1: case -1:
return false; return false;
case 1: case 1:
@ -112,7 +108,6 @@ public class DinnerPermsResolver implements PermissionsResolver {
return perms.hasPermission(permission) ? 1 : -1; return perms.hasPermission(permission) ? 1 : -1;
} else { } else {
Permission perm = server.getPluginManager().getPermission(permission); Permission perm = server.getPluginManager().getPermission(permission);
if (perm != null) { if (perm != null) {
return perm.getDefault().getValue(perms.isOp()) ? 1 : 0; return perm.getDefault().getValue(perms.isOp()) ? 1 : 0;
} else { } else {