diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java index 943af29e5e..424098ebc7 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java @@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.inventory; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap.Builder; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import net.minecraft.nbt.NBTTagCompound; import org.bukkit.Material; @@ -28,7 +28,7 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage CraftMetaEnchantedBook that = (CraftMetaEnchantedBook) meta; if (that.hasEnchants()) { - this.enchantments = new HashMap(that.enchantments); + this.enchantments = new LinkedHashMap(that.enchantments); } } @@ -105,7 +105,7 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage CraftMetaEnchantedBook meta = (CraftMetaEnchantedBook) super.clone(); if (this.enchantments != null) { - meta.enchantments = new HashMap(this.enchantments); + meta.enchantments = new LinkedHashMap(this.enchantments); } return meta; @@ -146,7 +146,7 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage @Override public boolean addStoredEnchant(Enchantment ench, int level, boolean ignoreRestrictions) { if (enchantments == null) { - enchantments = new HashMap(4); + enchantments = new LinkedHashMap(4); } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {