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

This commit is contained in:
Martoph 2020-08-28 12:28:06 +10:00 committed by md_5
parent 97da39889c
commit e14c9acbec
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

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);
}