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,9 +31,11 @@ public class ImportPermBukkit extends SimplyAPI implements ImportManager {
addPlayerGroup(player, group);
}
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")) {
for (Entry<String, Object> worldperm : permBukkit.getConfigurationSection("users/" + player + "/worlds/" + world).getValues(false).entrySet()) {
@ -43,9 +45,11 @@ public class ImportPermBukkit extends SimplyAPI implements ImportManager {
}
for (String group : plugin.getKeys(permBukkit, "groups")) {
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")) {
for (Entry<String, Object> worldperm : permBukkit.getConfigurationSection("groups/" + group + "/worlds/" + world).getValues(false).entrySet()) {

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: