summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java4
2 files changed, 4 insertions, 3 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 456283c63..6fc20d0b5 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -108,4 +108,5 @@ v 1.9:
- Better optimize assembling of a players permissions and allow the * node to populate all registered superperms.
- Fixed text when adding a subgroup to not say the player was moved.
- Update to new Bukkit Event system.
- - Update GroupManagerBridge for new event system. \ No newline at end of file
+ - Update GroupManagerBridge for new event system.
+ - Fixed a random null error upon a player portaling. \ 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 f9363e04d..e4bb94592 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
@@ -378,7 +378,7 @@ public class BukkitPermissions {
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerPortal(PlayerPortalEvent event) { // will portal into another world
- if (event.getTo() != null && !event.getFrom().getWorld().equals(event.getTo().getWorld())) { // only if world actually changed
+ if ((event.getTo() != null) && (!event.getFrom().getWorld().equals(event.getTo().getWorld()))) { // only if world actually changed
updatePermissions(event.getPlayer(), event.getTo().getWorld().getName());
}
}
@@ -390,7 +390,7 @@ public class BukkitPermissions {
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerTeleport(PlayerTeleportEvent event) { // can be teleported into another world
- if (event.getTo() != null && !event.getFrom().getWorld().equals(event.getTo().getWorld())) { // only if world actually changed
+ if ((event.getTo() != null) && (!event.getFrom().getWorld().equals(event.getTo().getWorld()))) { // only if world actually changed
updatePermissions(event.getPlayer(), event.getTo().getWorld().getName());
}
}