NPE when import from PermissionsBukkit (1.7.1)

This commit is contained in:
Michel Roux 2012-05-11 10:01:18 +02:00
parent 0ad58581d8
commit 8d49e0ecc0
2 changed files with 9 additions and 5 deletions

View File

@ -31,8 +31,10 @@ public class ImportPermBukkit extends SimplyAPI implements ImportManager {
addPlayerGroup(player, group);
}
for (Entry<String, Object> perm : permBukkit.getConfigurationSection("users/" + player + "/permissions").getValues(false).entrySet()) {
addPlayerPermission(player, perm.getKey(), (Boolean) perm.getValue());
if (permBukkit.getConfigurationSection("users/" + player + "/permissions") != null) {
for (Entry<String, Object> perm : permBukkit.getConfigurationSection("users/" + player + "/permissions").getValues(false).entrySet()) {
addPlayerPermission(player, perm.getKey(), (Boolean) perm.getValue());
}
}
for (String world : plugin.getKeys(permBukkit, "users/" + player + "/worlds")) {
@ -43,8 +45,10 @@ public class ImportPermBukkit extends SimplyAPI implements ImportManager {
}
for (String group : plugin.getKeys(permBukkit, "groups")) {
for (Entry<String, Object> perms : permBukkit.getConfigurationSection("groups/" + group + "/permissions").getValues(false).entrySet()) {
addGroupPermission(group, perms.getKey(), (Boolean) perms.getValue());
if (permBukkit.getConfigurationSection("groups/" + group + "/permissions") != null) {
for (Entry<String, Object> perms : permBukkit.getConfigurationSection("groups/" + group + "/permissions").getValues(false).entrySet()) {
addGroupPermission(group, perms.getKey(), (Boolean) perms.getValue());
}
}
for (String world : plugin.getKeys(permBukkit, "groups/" + group + "/worlds")) {

View File

@ -2,7 +2,7 @@ name: SimplyPerms
main: net.crystalyx.bukkit.simplyperms.SimplyPlugin
author: Xefir Destiny
website: http://www.crystalyx.net/
version: 1.7
version: 1.7.1
softdepend: [ PermissionsBukkit ]
commands:
permissions: