mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2025-01-06 19:28:20 +01:00
Fix sponge entity NPE during teleport.
This commit is contained in:
parent
3425645a9b
commit
aff8af0efa
@ -693,7 +693,7 @@ public void onEntityTeleport(MoveEntityEvent.Teleport event) {
|
|||||||
final Location<World> sourceLocation = event.getFromTransform().getLocation();
|
final Location<World> sourceLocation = event.getFromTransform().getLocation();
|
||||||
final Location<World> destination = event.getToTransform().getLocation();
|
final Location<World> destination = event.getToTransform().getLocation();
|
||||||
// Handle BorderClaimEvent
|
// Handle BorderClaimEvent
|
||||||
if (!CommonEntityEventHandler.getInstance().onEntityMove(event, sourceLocation, destination, player)) {
|
if (!CommonEntityEventHandler.getInstance().onEntityMove(event, sourceLocation, destination, entity)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
GDTimings.ENTITY_TELEPORT_EVENT.stopTiming();
|
GDTimings.ENTITY_TELEPORT_EVENT.stopTiming();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user