From b4f646a11aca54a984fe6d681d70d601786c6858 Mon Sep 17 00:00:00 2001 From: Wizjany Date: Thu, 30 Jun 2011 09:19:34 -0400 Subject: [PATCH] Added backwards compatibility for per-world permissions. (Not sure why it hasn't popped up before now) --- .../com/sk89q/bukkit/migration/NijiPermissionsResolver.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/bukkit/migration/NijiPermissionsResolver.java b/src/main/java/com/sk89q/bukkit/migration/NijiPermissionsResolver.java index 3218ddad0..84f32e674 100644 --- a/src/main/java/com/sk89q/bukkit/migration/NijiPermissionsResolver.java +++ b/src/main/java/com/sk89q/bukkit/migration/NijiPermissionsResolver.java @@ -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;