mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-12 05:08:48 +00:00
Fixed a random null error upon a player portaling.
This commit is contained in:
parent
4b61ac9043
commit
9041596384
|
@ -109,3 +109,4 @@ v 1.9:
|
||||||
- Fixed text when adding a subgroup to not say the player was moved.
|
- Fixed text when adding a subgroup to not say the player was moved.
|
||||||
- Update to new Bukkit Event system.
|
- Update to new Bukkit Event system.
|
||||||
- Update GroupManagerBridge for new event system.
|
- Update GroupManagerBridge for new event system.
|
||||||
|
- Fixed a random null error upon a player portaling.
|
|
@ -378,7 +378,7 @@ public class BukkitPermissions {
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerPortal(PlayerPortalEvent event) { // will portal into another world
|
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());
|
updatePermissions(event.getPlayer(), event.getTo().getWorld().getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -390,7 +390,7 @@ public class BukkitPermissions {
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerTeleport(PlayerTeleportEvent event) { // can be teleported into another world
|
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());
|
updatePermissions(event.getPlayer(), event.getTo().getWorld().getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue