mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-09 00:42:01 +01:00
Fix for Bukkit passing a null To location on a player Portaling
This commit is contained in:
parent
3030093907
commit
49e2c38289
@ -35,3 +35,4 @@ v 1.2:
|
|||||||
- Added event handling to manage new world creation at runtime.
|
- Added event handling to manage new world creation at runtime.
|
||||||
- Added the ability to handle unknown worlds at server start.
|
- 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)
|
(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
|
@ -198,7 +198,7 @@ public class BukkitPermissions {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerPortal(PlayerPortalEvent event) { // will portal into another world
|
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());
|
updatePermissions(event.getPlayer(), event.getTo().getWorld().getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -210,7 +210,7 @@ public class BukkitPermissions {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerTeleport(PlayerTeleportEvent event) { // can be teleported into another world
|
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());
|
updatePermissions(event.getPlayer(), event.getTo().getWorld().getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user