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);
|
return section.getItemStack(path);
|
||||||
} else {
|
} else {
|
||||||
ConfigurationSection s = section.getConfigurationSection(path);
|
ConfigurationSection s = section.getConfigurationSection(path);
|
||||||
Map<String, Object> serialize = s.getValues(false);
|
Material type = Material.getMaterial(s.getString("type"));
|
||||||
serialize.remove("enchantments");
|
short damage = new Integer(s.getInt("damage", 0)).shortValue();
|
||||||
ItemStack result = ItemStack.deserialize(serialize);
|
int amount = s.getInt("amaount", 1);
|
||||||
|
|
||||||
|
ItemStack result = new ItemStack(type, amount, damage);
|
||||||
Map<String, Object> item = section.getConfigurationSection(path).getValues(false);
|
Map<String, Object> item = section.getConfigurationSection(path).getValues(false);
|
||||||
item.remove("enchantments");
|
item.remove("enchantments");
|
||||||
if (s.contains("enchantments")) {
|
if (s.contains("enchantments")) {
|
||||||
|
|
Loading…
Reference in a new issue