diff --git a/src/main/java/co/kepler/fastcraftplus/config/LanguageConfig.java b/src/main/java/co/kepler/fastcraftplus/config/LanguageConfig.java index b99948e6..8fbefabf 100644 --- a/src/main/java/co/kepler/fastcraftplus/config/LanguageConfig.java +++ b/src/main/java/co/kepler/fastcraftplus/config/LanguageConfig.java @@ -180,7 +180,8 @@ public String gui_title() { } public String gui_itemName(ItemStack item) { - return getNullable("gui.item-name", "name", BukkitUtil.getItemName(item)); + String name = getNullable("gui.item-name", "name", BukkitUtil.getItemName(item)); + return name != null ? name : item.getItemMeta().getDisplayName(); } public List gui_hashcode(FastRecipe recipe) { diff --git a/src/main/java/co/kepler/fastcraftplus/craftgui/GUIButtonRecipe.java b/src/main/java/co/kepler/fastcraftplus/craftgui/GUIButtonRecipe.java index 3f00a105..af6ba8b3 100644 --- a/src/main/java/co/kepler/fastcraftplus/craftgui/GUIButtonRecipe.java +++ b/src/main/java/co/kepler/fastcraftplus/craftgui/GUIButtonRecipe.java @@ -51,9 +51,7 @@ public ItemStack getItem() { Map ingredients = recipe.getIngredients(); // Set the display name of the item - if (!meta.hasDisplayName()) { - meta.setDisplayName(lang.gui_itemName(item)); - } + meta.setDisplayName(lang.gui_itemName(item)); // Add ingredients and amounts to the lore lore.addFirst(lang.gui_ingredients_label());