Fix sponge entity NPE during teleport.

This commit is contained in:
bloodshot 2019-12-20 15:41:37 -05:00
parent 3425645a9b
commit aff8af0efa

View File

@ -693,7 +693,7 @@ public void onEntityTeleport(MoveEntityEvent.Teleport event) {
final Location<World> sourceLocation = event.getFromTransform().getLocation();
final Location<World> destination = event.getToTransform().getLocation();
// Handle BorderClaimEvent
if (!CommonEntityEventHandler.getInstance().onEntityMove(event, sourceLocation, destination, player)) {
if (!CommonEntityEventHandler.getInstance().onEntityMove(event, sourceLocation, destination, entity)) {
event.setCancelled(true);
GDTimings.ENTITY_TELEPORT_EVENT.stopTiming();
return;