mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-10 16:48:05 +02:00
Check for a null player object in the PlayerTeleportEvent.
This commit is contained in:
@@ -119,4 +119,5 @@ v 1.9:
|
|||||||
- '/manuaddsub' now correctly reports if it was able to add the sub group.
|
- '/manuaddsub' now correctly reports if it was able to add the sub group.
|
||||||
- Allow negation to the * permission node when populating superperms.
|
- Allow negation to the * permission node when populating superperms.
|
||||||
- Fix trying to modify an unmodifiable collection breaking superperms.
|
- Fix trying to modify an unmodifiable collection breaking superperms.
|
||||||
- Fixed subgroups (I broke earlier).
|
- Fixed subgroups (I broke earlier).
|
||||||
|
- Check for a null player object in the PlayerTeleportEvent.
|
@@ -397,7 +397,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.getPlayer() != 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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user