summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2011-10-02 18:00:42 +0100
committerElgarL <ElgarL@palmergames.com>2011-10-02 18:00:42 +0100
commit49e2c38289f4ca2eaa09f4f469376b45772ca8c0 (patch)
treed07fa6d00ec33e08b8131d343f9818f479eae386 /EssentialsGroupManager/src
parent3030093907930543521d27e6f8e814251bc08b59 (diff)
downloadEssentials-49e2c38289f4ca2eaa09f4f469376b45772ca8c0.tar
Essentials-49e2c38289f4ca2eaa09f4f469376b45772ca8c0.tar.gz
Essentials-49e2c38289f4ca2eaa09f4f469376b45772ca8c0.tar.lz
Essentials-49e2c38289f4ca2eaa09f4f469376b45772ca8c0.tar.xz
Essentials-49e2c38289f4ca2eaa09f4f469376b45772ca8c0.zip
Fix for Bukkit passing a null To location on a player Portaling
Diffstat (limited to 'EssentialsGroupManager/src')
-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 bae06f1de..b8034e19c 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -34,4 +34,5 @@ v 1.2:
- Attempt to stop GM wiping groups/users yml's on a bad shut down.
- Added event handling to manage new world creation at runtime.
- Added the ability to handle unknown worlds at server start.
- (GM will create the data files for any worlds it finds which are not in the config.yml) \ No newline at end of file
+ (GM will create the data files for any worlds it finds which are not in the config.yml)
+ - Fix for Bukkit passing a null To location on 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 5d153738e..19d90854b 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
@@ -198,7 +198,7 @@ public class BukkitPermissions {
@Override
public void onPlayerPortal(PlayerPortalEvent event) { // will portal into another world
- if(!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());
}
}
@@ -210,7 +210,7 @@ public class BukkitPermissions {
@Override
public void onPlayerTeleport(PlayerTeleportEvent event) { // can be teleported into another world
- if (!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());
}
}