diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-01-31 01:07:38 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-01-31 01:07:38 +0000 |
commit | c75e53935f1bf518d71bffcb5cd67647cf9e5c1a (patch) | |
tree | 41ca22965624866112d1af31295fc8cf86ad8ab7 /src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java | |
parent | 0dd9e4873db032005436fefcbf246fa32bd103f1 (diff) | |
download | craftbukkit-c75e53935f1bf518d71bffcb5cd67647cf9e5c1a.tar craftbukkit-c75e53935f1bf518d71bffcb5cd67647cf9e5c1a.tar.gz craftbukkit-c75e53935f1bf518d71bffcb5cd67647cf9e5c1a.tar.lz craftbukkit-c75e53935f1bf518d71bffcb5cd67647cf9e5c1a.tar.xz craftbukkit-c75e53935f1bf518d71bffcb5cd67647cf9e5c1a.zip |
Renamed ItemStack.set/getDamage to durability, which is now a short
Diffstat (limited to 'src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index f08391c1..122ad08a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -10,7 +10,7 @@ public class CraftItemStack extends ItemStack { super( item != null ? item.id: 0, item != null ? item.count : 0, - (byte)(item != null ? item.damage : 0) + (short)(item != null ? item.damage : 0) ); this.item = item; } @@ -101,21 +101,21 @@ public class CraftItemStack extends ItemStack { } @Override - public void setDamage(final byte damage) { + public void setDurability(final short durability) { // Ignore damage if item is null if (item != null) { - super.setDamage(damage); - item.damage = damage; + super.setDurability(durability); + item.damage = durability; } } @Override - public byte getDamage() { + public short getDurability() { if (item != null) { - super.setDamage((byte) item.damage); // sync, needed? - return (byte) item.damage; + super.setDurability((short) item.damage); // sync, needed? + return (short) item.damage; } else { - return 0; + return -1; } } |