Fix for 1.1-R4 fallback load of old inventories
This commit is contained in:
parent
64b2beac27
commit
7458b09a17
1 changed files with 5 additions and 3 deletions
|
@ -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")) {
|
||||
|
|
Loading…
Reference in a new issue