Fixed setting custom names and lore with treasures

This commit is contained in:
TfT_02 2014-06-22 20:42:48 +02:00
parent 8e474170e4
commit 0de1187012
2 changed files with 3 additions and 2 deletions

View File

@ -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'

View File

@ -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);
}
}