diff options
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java | 4 |
1 files changed, 2 insertions, 2 deletions
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());
}
}
|