SPIGOT-6113: Ender Pearls thrown into portals that lead to disabled dimensions crash the server

By: Martoph <sager1018@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2020-08-28 12:28:06 +10:00
parent de8eaf9469
commit 269b497c90

View File

@ -60,3 +60,12 @@
}
} else if (entity != null) {
entity.enderTeleportTo(this.locX(), this.locY(), this.locZ());
@@ -80,7 +100,7 @@
public Entity b(WorldServer worldserver) {
Entity entity = this.getShooter();
- if (entity != null && entity.world.getDimensionKey() != worldserver.getDimensionKey()) {
+ if (entity != null && worldserver != null && entity.world.getDimensionKey() != worldserver.getDimensionKey()) { // CraftBukkit - SPIGOT-6113
this.setShooter((Entity) null);
}