diff --git a/paper-api/src/main/java/org/bukkit/inventory/Inventory.java b/paper-api/src/main/java/org/bukkit/inventory/Inventory.java index e4bc9afd59..043da1cf82 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/Inventory.java +++ b/paper-api/src/main/java/org/bukkit/inventory/Inventory.java @@ -104,7 +104,7 @@ public interface Inventory { * @param materialId The materialId to look for * @return The Slots found. */ - public HashMap all(int materialId); + public HashMap all(int materialId); /** * Find all slots in the inventory containing any ItemStacks with the given material @@ -112,7 +112,7 @@ public interface Inventory { * @param materialId The material to look for * @return The Slots found. */ - public HashMap all(Material material); + public HashMap all(Material material); /** * Find all slots in the inventory containing any ItemStacks with the given ItemStack @@ -121,7 +121,7 @@ public interface Inventory { * @param item The ItemStack to match against * @return The Slots found. */ - public HashMap all(ItemStack item); + public HashMap all(ItemStack item); /** * Find the first slot in the inventory containing an ItemStack with the given materialId diff --git a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java index 3d6df5d38e..f7b509bc6d 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java @@ -30,21 +30,21 @@ public class ItemStack { } public ItemStack(final int type, final int amount, final byte damage) { - this(type, amount, damage, (byte) 0); + this(type, amount, damage, null); } public ItemStack(final Material type, final int amount, final byte damage) { this(type.getId(), amount, damage); } - public ItemStack(final int type, final int amount, final byte damage, final byte data) { + public ItemStack(final int type, final int amount, final byte damage, final Byte data) { this.type = type; this.amount = amount; this.damage = damage; - createData(data); + if (data != null) createData(data); } - public ItemStack(final Material type, final int amount, final byte damage, final byte data) { + public ItemStack(final Material type, final int amount, final byte damage, final Byte data) { this(type.getId(), amount, damage, data); } diff --git a/paper-api/src/main/java/org/bukkit/inventory/PlayerInventory.java b/paper-api/src/main/java/org/bukkit/inventory/PlayerInventory.java index 983fec4b0e..0e82ca0e15 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/PlayerInventory.java +++ b/paper-api/src/main/java/org/bukkit/inventory/PlayerInventory.java @@ -74,7 +74,7 @@ public interface PlayerInventory extends Inventory { /** * Returns the ItemStack currently hold * - * @return The currently holded ItemStack + * @return The currently held ItemStack */ public ItemStack getItemInHand();