fix NPE on EntityTeleportEvent getTo (#10016)
This commit is contained in:
parent
dce06a986f
commit
7ecbd18f48
3 changed files with 68 additions and 2 deletions
|
@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ this, this.getLocation(), location);
|
||||
+ // cancelling the event is handled differently for players and entities,
|
||||
+ // entities just stop teleporting, players will still teleport to the "from" location of the event
|
||||
+ if (!event.callEvent()) {
|
||||
+ if (!event.callEvent() || event.getTo() == null) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ location = event.getTo();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue