浏览代码

Fixed setting custom names and lore with treasures

TfT_02 11 年之前
父节点
当前提交
0de1187012
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 1 0
      Changelog.txt
  2. 2 2
      src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java

+ 1 - 0
Changelog.txt

@@ -25,6 +25,7 @@ Version 1.5.01-dev
  = Fixed bug which causes /party teleport to stop working
  = Fixed bug which causes /party teleport to stop working
  = Fixed bug where SaveTimerTask would produce an IndexOutOfBoundsException
  = Fixed bug where SaveTimerTask would produce an IndexOutOfBoundsException
  = Fixed bug where Alchemy would not fire BrewEvents
  = 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
  ! Changed player data saving. Save tasks are now asynchronous
  ! Vanished players no longer get hit by AoE effects
  ! Vanished players no longer get hit by AoE effects
  ! Changed Alchemy config option 'Prevent_Hopper_Transfer' renamed to 'Prevent_Hopper_Transfer_Ingredients'
  ! 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")) {
                 if (config.contains(type + "." + treasureName + ".Custom_Name")) {
                     ItemMeta itemMeta = item.getItemMeta();
                     ItemMeta itemMeta = item.getItemMeta();
-                    itemMeta.setDisplayName(config.getString(type + "." + treasureName + "Custom_Name"));
+                    itemMeta.setDisplayName(config.getString(type + "." + treasureName + ".Custom_Name"));
                     item.setItemMeta(itemMeta);
                     item.setItemMeta(itemMeta);
                 }
                 }
 
 
                 if (config.contains(type + "." + treasureName + ".Lore")) {
                 if (config.contains(type + "." + treasureName + ".Lore")) {
                     ItemMeta itemMeta = item.getItemMeta();
                     ItemMeta itemMeta = item.getItemMeta();
-                    itemMeta.setLore(config.getStringList(type + "." + treasureName + "Custom_Name"));
+                    itemMeta.setLore(config.getStringList(type + "." + treasureName + ".Lore"));
                     item.setItemMeta(itemMeta);
                     item.setItemMeta(itemMeta);
                 }
                 }
             }
             }