Browse Source

Fixed setting custom names and lore with treasures

TfT_02 11 years ago
parent
commit
0de1187012

+ 1 - 0
Changelog.txt

@@ -25,6 +25,7 @@ Version 1.5.01-dev
  = Fixed bug which causes /party teleport to stop working
  = Fixed bug where SaveTimerTask would produce an IndexOutOfBoundsException
  = Fixed bug where Alchemy would not fire BrewEvents
+ = Fixed bug with setting custom names and lore in treasures config
  ! Changed player data saving. Save tasks are now asynchronous
  ! Vanished players no longer get hit by AoE effects
  ! Changed Alchemy config option 'Prevent_Hopper_Transfer' renamed to 'Prevent_Hopper_Transfer_Ingredients'

+ 2 - 2
src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java

@@ -259,13 +259,13 @@ public class TreasureConfig extends ConfigLoader {
 
                 if (config.contains(type + "." + treasureName + ".Custom_Name")) {
                     ItemMeta itemMeta = item.getItemMeta();
-                    itemMeta.setDisplayName(config.getString(type + "." + treasureName + "Custom_Name"));
+                    itemMeta.setDisplayName(config.getString(type + "." + treasureName + ".Custom_Name"));
                     item.setItemMeta(itemMeta);
                 }
 
                 if (config.contains(type + "." + treasureName + ".Lore")) {
                     ItemMeta itemMeta = item.getItemMeta();
-                    itemMeta.setLore(config.getStringList(type + "." + treasureName + "Custom_Name"));
+                    itemMeta.setLore(config.getStringList(type + "." + treasureName + ".Lore"));
                     item.setItemMeta(itemMeta);
                 }
             }