diff --git a/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsBukkit.java b/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsBukkit.java index ad7a807..a4338d7 100644 --- a/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsBukkit.java +++ b/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsBukkit.java @@ -188,6 +188,12 @@ public class Permission_PermissionsBukkit extends Permission { if (world != null && !world.isEmpty()) { return perms.getGroup(group).getInfo().getWorldPermissions(world).get(permission) == null ? false : perms.getGroup(group).getInfo().getWorldPermissions(world).get(permission); } + if (perms.getGroup(group) == null) + return false; + else if (perms.getGroup(group).getInfo() == null) + return false; + else if (perms.getGroup(group).getInfo().getPermissions() == null) + return false; return perms.getGroup(group).getInfo().getPermissions().get(permission); } @@ -320,7 +326,7 @@ public class Permission_PermissionsBukkit extends Permission { @Override public String[] getPlayerGroups(String world, String player) { List groupList = new ArrayList(); - if (world != null) { + if (world != null && perms.getPlayerInfo(player) != null) { for (Group group : perms.getPlayerInfo(player).getGroups()) { if (group.getInfo().getWorlds().contains(world)) { groupList.add(group.getName()); @@ -336,7 +342,9 @@ public class Permission_PermissionsBukkit extends Permission { @Override public String getPrimaryGroup(String world, String player) { - if (perms.getPlayerInfo(player).getGroups() != null ) { + if (perms.getPlayerInfo(player) == null) + return null; + else if (perms.getPlayerInfo(player).getGroups() != null ) { return perms.getPlayerInfo(player).getGroups().get(0).getName(); } return null;