diff --git a/Essentials/src/com/earth2me/essentials/items/AbstractItemDb.java b/Essentials/src/com/earth2me/essentials/items/AbstractItemDb.java index 7a3d9a234..867d3ae13 100644 --- a/Essentials/src/com/earth2me/essentials/items/AbstractItemDb.java +++ b/Essentials/src/com/earth2me/essentials/items/AbstractItemDb.java @@ -64,7 +64,7 @@ public abstract class AbstractItemDb implements IConf, net.ess3.api.IItemDb { @Override public String serialize(ItemStack is) { - String mat = is.getType().name(); + String mat = name(is); if (VersionUtil.getServerBukkitVersion().isLowerThanOrEqualTo(VersionUtil.v1_12_2_R01) && is.getData().getData() != 0) { mat = mat + ":" + is.getData().getData(); } diff --git a/Essentials/src/com/earth2me/essentials/items/LegacyItemDb.java b/Essentials/src/com/earth2me/essentials/items/LegacyItemDb.java index 6700c2211..6f84c8104 100644 --- a/Essentials/src/com/earth2me/essentials/items/LegacyItemDb.java +++ b/Essentials/src/com/earth2me/essentials/items/LegacyItemDb.java @@ -150,6 +150,13 @@ public class LegacyItemDb extends AbstractItemDb { } } + if (itemid < 1) { + Material matFromName = EnumUtil.getMaterial(itemname.toUpperCase()); + if (matFromName != null) { + itemid = matFromName.getId(); + } + } + if (itemid < 1) { throw new Exception(tl("unknownItemName", itemname)); }