Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 21:10:17 +01:00
Fix loading Items entities with an invalid item. Addresses BUKKIT-3249
Dieser Commit ist enthalten in:
Ursprung
118682ce5c
Commit
f71be2506d
@ -195,7 +195,18 @@ public class EntityItem extends Entity {
|
|||||||
this.age = nbttagcompound.getShort("Age");
|
this.age = nbttagcompound.getShort("Age");
|
||||||
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Item");
|
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Item");
|
||||||
|
|
||||||
this.setItemStack(ItemStack.a(nbttagcompound1));
|
// CraftBukkit start
|
||||||
|
if (nbttagcompound1 != null) {
|
||||||
|
ItemStack itemstack = ItemStack.a(nbttagcompound1);
|
||||||
|
if (itemstack != null) {
|
||||||
|
this.setItemStack(itemstack);
|
||||||
|
} else {
|
||||||
|
this.die();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.die();
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
if (this.getItemStack() == null) {
|
if (this.getItemStack() == null) {
|
||||||
this.die();
|
this.die();
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren