geforkt von Mirrors/Paper
Add a null check for Item Entities. Fixes BUKKIT-3249
Dieser Commit ist enthalten in:
Ursprung
b870755edb
Commit
e937307596
@ -28,6 +28,11 @@ public class EntityItem extends Entity {
|
|||||||
|
|
||||||
public EntityItem(World world, double d0, double d1, double d2, ItemStack itemstack) {
|
public EntityItem(World world, double d0, double d1, double d2, ItemStack itemstack) {
|
||||||
this(world, d0, d1, d2);
|
this(world, d0, d1, d2);
|
||||||
|
// CraftBukkit start - Can't set null items in the datawatcher
|
||||||
|
if (itemstack == null || itemstack.getItem() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
this.setItemStack(itemstack);
|
this.setItemStack(itemstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren