Added backwards compatibility for per-world permissions. (Not sure why it hasn't popped up before now)

This commit is contained in:
Wizjany 2011-06-30 09:19:34 -04:00
parent cf3238d50e
commit b4f646a11a

View File

@ -69,7 +69,11 @@ public class NijiPermissionsResolver implements PermissionsResolver {
public boolean hasPermission(String worldName, String name, String permission) {
try {
return api.getHandler().has(worldName, name, permission);
try {
return api.getHandler().has(worldName, name, permission);
} catch (Throwable t) {
return api.getHandler().has(server.getPlayer(name), permission);
}
} catch (Throwable t) {
t.printStackTrace();
return false;