summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorstarrynte <starrynte@gmail.com>2012-02-01 21:30:01 -0800
committerEvilSeph <evilseph@gmail.com>2012-02-03 01:54:00 -0500
commit687710c2a15b3012606d3123ee2d778d5f445125 (patch)
treeb94d138b3547f1cfdc03ebefa2b21fb33c62b7fb /src/main/java
parent088762d67eac7eb772f694c9ad23845e809d9ce8 (diff)
downloadbukkit-687710c2a15b3012606d3123ee2d778d5f445125.tar
bukkit-687710c2a15b3012606d3123ee2d778d5f445125.tar.gz
bukkit-687710c2a15b3012606d3123ee2d778d5f445125.tar.lz
bukkit-687710c2a15b3012606d3123ee2d778d5f445125.tar.xz
bukkit-687710c2a15b3012606d3123ee2d778d5f445125.zip
Fixed casting in ItemStack.deserialize.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/inventory/ItemStack.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 7a424c79..95dc1f10 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -356,18 +356,18 @@ public class ItemStack implements ConfigurationSerializable {
public static ItemStack deserialize(Map<String, Object> args) {
Material type = Material.getMaterial((String) args.get("type"));
- int damage = 0;
+ short damage = 0;
int amount = 1;
if (args.containsKey("damage")) {
- damage = (Integer) args.get("damage");
+ damage = (Short) args.get("damage");
}
if (args.containsKey("amount")) {
amount = (Integer) args.get("amount");
}
- ItemStack result = new ItemStack(type, amount, (short) damage);
+ ItemStack result = new ItemStack(type, amount, damage);
if (args.containsKey("enchantments")) {
Object raw = args.get("enchantments");