Added new option "Items.Name Format Reset"

This commit is contained in:
Brianna 2019-07-14 14:37:54 -04:00
parent 56990ed896
commit 913c66dbd5
2 changed files with 8 additions and 2 deletions

View File

@ -82,7 +82,8 @@ public class Methods {
.getString("Items." + item.getType().name() + ".Display Name"));
if (item.hasItemMeta() && item.getItemMeta().hasDisplayName())
displayName = ChatColor.stripColor(item.getItemMeta().getDisplayName());
displayName = Setting.NAME_FORMAT_RESET.getBoolean() ?
ChatColor.stripColor(item.getItemMeta().getDisplayName()) : item.getItemMeta().getDisplayName();
nameFormat = nameFormat.replace("{TYPE}", displayName);
nameFormat = nameFormat.replace("{AMT}", Integer.toString(amount));

View File

@ -135,9 +135,14 @@ public enum Setting {
"The max stack size for items.",
"Currently this can only be set to a max of 120."),
NAME_FORMAT_ITEM("Items.Name Format", "&f{TYPE} [&6{AMT}x]",
NAME_FORMAT_ITEM("Items.Name Format", "&f{TYPE} &r[&6{AMT}x]",
"The text displayed above a dropped item."),
NAME_FORMAT_RESET("Items.Name Format Reset", true,
"Should color codes in dropped item names be removed?",
"This is added only because it looks smoother in game. This is only visual and",
"doesn't actually effect the item."),
SHOW_STACK_SIZE_SINGLE("Items.Show Stack Size For Single", false,
"When enabled stack sizes for a stack with a single item will",
"not display the stack size. The stack size will be added",