mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 13:07:06 +01:00
Add a null check for Item Entities. Fixes BUKKIT-3249
This commit is contained in:
parent
b870755edb
commit
e937307596
1 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,11 @@ public class EntityItem extends Entity {
|
|||
|
||||
public EntityItem(World world, double d0, double d1, double d2, ItemStack itemstack) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue