ItemStack.asBukkitStack(null) should return Air. Fixes BUKKIT-3170

By: feildmaster <admin@feildmaster.com>
This commit is contained in:
CraftBukkit/Spigot
2012-12-15 01:33:14 -06:00
parent 30e0f5be63
commit 9d7ccb79f2
2 changed files with 5 additions and 4 deletions

View File

@@ -1,10 +1,9 @@
package org.bukkit.craftbukkit.entity;
import net.minecraft.server.EntityItemFrame;
import net.minecraft.server.ItemStack;
import org.apache.commons.lang.Validate;
import org.bukkit.Material;
import org.bukkit.Rotation;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.inventory.CraftItemStack;
@@ -26,8 +25,7 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
}
public org.bukkit.inventory.ItemStack getItem() {
ItemStack i = getHandle().i();
return i == null ? new org.bukkit.inventory.ItemStack(Material.AIR) : CraftItemStack.asBukkitStack(i);
return CraftItemStack.asBukkitStack(getHandle().i());
}
public Rotation getRotation() {