mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-02 05:02:10 -07:00
fix NPE on EntityTeleportEvent getTo (#10016)
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user