From 8103e822ed54d8ade9fbacf06f8cd9220ee12a87 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Sat, 24 Sep 2011 02:47:01 +0100 Subject: [PATCH 1/2] Fix for null in PLAYER_TELEPORT for bukkit perms. --- EssentialsGroupManager/src/Changelog.txt | 3 ++- .../groupmanager/permissions/BukkitPermissions.java | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 6015b470e..388fc938a 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -13,4 +13,5 @@ v 1.1: - Push updates to superperms for all valid GM commands. - All GroupManager commands issued by players are now echoed in the console. - Reverted WorldHolder static change to maintain backward plugin compatibility. - - Update to handle 'getDescription().getPermissions(') returning a list (CB 1172). \ No newline at end of file + - Update to handle 'getDescription().getPermissions(') returning a list (CB 1172). + - Fix for null in PLAYER_TELEPORT for bukkit perms. \ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java index ec6fcebca..cf3edafc0 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java @@ -195,11 +195,9 @@ public class BukkitPermissions { @Override public void onPlayerPortal(PlayerPortalEvent event) { // will portal into another world - if(event.getPlayer().getWorld().equals(event.getTo().getWorld())){ // only if world actually changed - return; + if(!event.getFrom().getWorld().equals(event.getTo().getWorld())){ // only if world actually changed + updatePermissions(event.getPlayer(), event.getTo().getWorld().getName()); } - - updatePermissions(event.getPlayer(), event.getTo().getWorld().getName()); } @Override From b0fe18915694ad92102e78a1ba477aab34e1059e Mon Sep 17 00:00:00 2001 From: ElgarL Date: Sat, 24 Sep 2011 02:53:38 +0100 Subject: [PATCH 2/2] Fixed wasteful updating of perms on a manload. --- EssentialsGroupManager/src/Changelog.txt | 3 ++- .../src/org/anjocaido/groupmanager/GroupManager.java | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 388fc938a..232a35e1a 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -14,4 +14,5 @@ v 1.1: - All GroupManager commands issued by players are now echoed in the console. - Reverted WorldHolder static change to maintain backward plugin compatibility. - Update to handle 'getDescription().getPermissions(') returning a list (CB 1172). - - Fix for null in PLAYER_TELEPORT for bukkit perms. \ No newline at end of file + - Fix for null in PLAYER_TELEPORT for bukkit perms. + - Fixed wasteful updating of perms on a manload. \ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index b56d42122..52b67c57c 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -1423,9 +1423,14 @@ public class GroupManager extends JavaPlugin { auxString += " "; } } + + isLoaded = false; // Disable Bukkit Perms update + worldsHolder.loadWorld(auxString); sender.sendMessage("The request to world '" + auxString + "' was sent."); + isLoaded = true; + BukkitPermissions.updateAllPlayers(); return true;