mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
Check TravelAgent.findOrCreate(Location) for null; Fixes BUKKIT-3590
If a custom TravelAgent is used and returns null for findOrCreate method a NullPointerException will occur. Conflicts: src/main/java/net/minecraft/server/PlayerList.java
This commit is contained in:
parent
5bb81b75c7
commit
d06e597ca5
1 changed files with 3 additions and 0 deletions
|
@ -460,6 +460,9 @@ public abstract class PlayerList {
|
|||
}
|
||||
|
||||
exit = event.useTravelAgent() ? event.getPortalTravelAgent().findOrCreate(event.getTo()) : event.getTo();
|
||||
if (exit == null) {
|
||||
return;
|
||||
}
|
||||
exitWorld = ((CraftWorld) exit.getWorld()).getHandle();
|
||||
|
||||
Vector velocity = entityplayer.getBukkitEntity().getVelocity();
|
||||
|
|
Loading…
Reference in a new issue