Fix for 1.1-R4 fallback load of old inventories

This commit is contained in:
Jascha Starke 2012-02-26 10:53:40 +01:00
parent 64b2beac27
commit 7458b09a17

View file

@ -78,9 +78,11 @@ public class Fallback {
return section.getItemStack(path);
} else {
ConfigurationSection s = section.getConfigurationSection(path);
Map<String, Object> serialize = s.getValues(false);
serialize.remove("enchantments");
ItemStack result = ItemStack.deserialize(serialize);
Material type = Material.getMaterial(s.getString("type"));
short damage = new Integer(s.getInt("damage", 0)).shortValue();
int amount = s.getInt("amaount", 1);
ItemStack result = new ItemStack(type, amount, damage);
Map<String, Object> item = section.getConfigurationSection(path).getValues(false);
item.remove("enchantments");
if (s.contains("enchantments")) {