Adds blacksmith title #9

This commit is contained in:
2022-10-14 11:28:00 +02:00
parent 4fa47349c6
commit 0c6a28d7df
4 changed files with 29 additions and 6 deletions

View File

@ -48,6 +48,14 @@ public enum NPCSetting {
*/
REFORGE_ABLE_ITEMS("reforgeAbleItems", SettingValueType.STRING_LIST, new String[]{}, "reforgeAbleItems"),
/**
* The setting for the title used to display which kind of blacksmith the NPC is
*
* <p>While this should be entirely configurable, values such as armor-smith, sword-smith and similar, which
* describe the blacksmith's specialization, and thus the range of reforge-able items, is expected.</p>
*/
BLACKSMITH_TITLE("blacksmithTitle", SettingValueType.STRING, "blacksmith", "blacksmithTitle"),
/*-----------
| Messages |
-----------*/
@ -74,7 +82,7 @@ public enum NPCSetting {
* The message displayed when displaying the cost of reforging the held item to the player
*/
COST_MESSAGE("messages.costMessage", SettingValueType.STRING,
"&eIt will cost &a<price> &eto reforge that &a<item>&e! Click again to reforge!", "costMessage"),
"&eIt will cost &a{cost}&e to reforge that &a{item}&e! Click again to reforge!", "costMessage"),
/**
* The message displayed if the blacksmith fails reforging an item
@ -92,7 +100,7 @@ public enum NPCSetting {
* The message displayed if the blacksmith encounters an item they cannot reforge
*/
INVALID_ITEM_MESSAGE("messages.invalidItemMessage", SettingValueType.STRING,
"&cI'm sorry, but I don't know how to reforge that!", "invalidItemMessage"),
"&cI'm sorry, but I'm a/an {title}, I don't know how to reforge that!", "invalidItemMessage"),
/**
* The message displayed if a player presents a different item after seeing the price to reforge an item

View File

@ -251,6 +251,15 @@ public class NPCSettings {
return ConfigHelper.asBoolean(getValue(NPCSetting.DROP_ITEM));
}
/**
* Gets the title of the blacksmith, describing which items it can reforge
*
* @return <p>The title of the blacksmith</p>
*/
public String getBlacksmithTitle() {
return asString(NPCSetting.BLACKSMITH_TITLE);
}
/**
* Gets whether to disable the reforge-cool-down
*