return null if the item is null :)

This commit is contained in:
Myles 2016-03-06 21:40:15 +00:00
parent d8ce66ce29
commit ca6638c740
1 changed files with 1 additions and 0 deletions

View File

@ -178,6 +178,7 @@ public class ItemSlotRewriter {
public CompoundTag tag;
public static ItemStack fromBukkit(org.bukkit.inventory.ItemStack stack) {
if(stack == null) return null;
ItemStack item = new ItemStack();
item.id = (short) stack.getTypeId();
item.amount = (byte) stack.getAmount();