Changes configuration values to lower camelcase

Also fixes some grammar mistakes related to the word reforge
This commit is contained in:
2022-10-03 12:39:15 +02:00
parent 9ffd788e29
commit 2489cac8db
10 changed files with 98 additions and 97 deletions

View File

@ -7,30 +7,31 @@ public enum GlobalSetting {
/**
* The base price for repairing, regardless of durability
*
* <p>This allows specifying a price for each item, by setting base-price.item_name.</p>
* <p>This allows specifying a price for each item, by setting basePrice.item_name.</p>
*/
BASE_PRICE("global.base-price.default", SettingValueType.POSITIVE_DOUBLE, 10.0, "basePrice"),
BASE_PRICE("global.basePrice.default", SettingValueType.POSITIVE_DOUBLE, 10.0, "basePrice"),
/**
* The base price for each durability point
*
* <p>If natural cost, this is the cost each missing durability point will add to the cost. If not natural cost,
* this is the cost each present durability point will add to the cost. This allows specifying a price per
* durability point value for each item, by setting price-per-durability-point.item_name</p>
* durability point value for each item, by setting pricePerDurabilityPoint.item_name</p>
*/
PRICE_PER_DURABILITY_POINT("global.price-per-durability-point.default", SettingValueType.POSITIVE_DOUBLE, 0.005, "pricePerDurabilityPoint"),
PRICE_PER_DURABILITY_POINT("global.pricePerDurabilityPoint.default", SettingValueType.POSITIVE_DOUBLE,
0.005, "pricePerDurabilityPoint"),
/**
* The price increase for each level of each present enchantment
*
* <p>This can be specified for each possible enchantment by setting enchantment-cost.enchantment_name</p>
*/
ENCHANTMENT_COST("global.enchantment-cost.default", SettingValueType.POSITIVE_DOUBLE, 5.0, "enchantmentCost"),
ENCHANTMENT_COST("global.enchantmentCost.default", SettingValueType.POSITIVE_DOUBLE, 5.0, "enchantmentCost"),
/**
* Whether the cost should increase for damage taken, as opposed to increase for durability present
*/
NATURAL_COST("global.natural-cost", SettingValueType.BOOLEAN, true, "useNaturalCost");
NATURAL_COST("global.useNaturalCost", SettingValueType.BOOLEAN, true, "useNaturalCost");
private final String path;
private final String parent;

View File

@ -7,43 +7,42 @@ import java.util.Arrays;
*/
public enum NPCSetting {
DROP_ITEM("defaults.drop-item", SettingValueType.BOOLEAN, true, "dropItem"),
DISABLE_COOL_DOWN("defaults.disable-cool-down", SettingValueType.BOOLEAN, false, "disableCoolDown"),
DISABLE_DELAY("defaults.disable-delay", SettingValueType.BOOLEAN, false, "disableDelay"),
FAIL_CHANCE("defaults.percent-chance-to-fail-reforge", SettingValueType.PERCENTAGE, 10, "failReforgeChance"),
EXTRA_ENCHANTMENT_CHANCE("defaults.percent-chance-for-extra-enchantment", SettingValueType.PERCENTAGE, 5,
DROP_ITEM("defaults.dropItem", SettingValueType.BOOLEAN, true, "dropItem"),
DISABLE_COOL_DOWN("defaults.disableCoolDown", SettingValueType.BOOLEAN, false, "disableCoolDown"),
DISABLE_DELAY("defaults.disableDelay", SettingValueType.BOOLEAN, false, "disableDelay"),
FAIL_CHANCE("defaults.failReforgeChance", SettingValueType.PERCENTAGE, 10, "failReforgeChance"),
EXTRA_ENCHANTMENT_CHANCE("defaults.extraEnchantmentChance", SettingValueType.PERCENTAGE, 5,
"extraEnchantmentChance"),
MAX_ENCHANTMENTS("defaults.maximum-enchantments", SettingValueType.POSITIVE_INTEGER, 3, "maxEnchantments"),
MAX_REFORGE_DELAY("defaults.delays-in-seconds.maximum", SettingValueType.POSITIVE_INTEGER, 30, "maxReforgeDelay"),
MIN_REFORGE_DELAY("defaults.delays-in-seconds.minimum", SettingValueType.POSITIVE_INTEGER, 5, "minReforgeDelay"),
REFORGE_COOL_DOWN("defaults.delays-in-seconds.reforge-cool-down", SettingValueType.POSITIVE_INTEGER, 60, "reforgeCoolDown"),
REFORGE_ABLE_ITEMS("defaults.reforge-able-items", SettingValueType.STRING_LIST, new String[]{}, "reforgeAbleItems"),
MAX_ENCHANTMENTS("defaults.maxEnchantments", SettingValueType.POSITIVE_INTEGER, 3, "maxEnchantments"),
MAX_REFORGE_DELAY("defaults.delaysInSeconds.maximum", SettingValueType.POSITIVE_INTEGER, 30, "maxReforgeDelay"),
MIN_REFORGE_DELAY("defaults.delaysInSeconds.minimum", SettingValueType.POSITIVE_INTEGER, 5, "minReforgeDelay"),
REFORGE_COOL_DOWN("defaults.delaysInSeconds.reforgeCoolDown", SettingValueType.POSITIVE_INTEGER, 60, "reforgeCoolDown"),
REFORGE_ABLE_ITEMS("defaults.reforgeAbleItems", SettingValueType.STRING_LIST, new String[]{}, "reforgeAbleItems"),
/*-----------
| Messages |
-----------*/
BUSY_WITH_PLAYER_MESSAGE("defaults.messages.busy-with-player", SettingValueType.STRING,
BUSY_WITH_PLAYER_MESSAGE("defaults.messages.busyPlayerMessage", SettingValueType.STRING,
"&cI'm busy at the moment. Come back later!", "busyPlayerMessage"),
//TODO: Add placeholder for remaining time?
BUSY_WITH_REFORGE_MESSAGE("defaults.messages.busy-with-reforge", SettingValueType.STRING,
BUSY_WITH_REFORGE_MESSAGE("defaults.messages.busyReforgeMessage", SettingValueType.STRING,
"&cI'm working on it. Be patient!", "busyReforgeMessage"),
//TODO: Add placeholder for remaining time?
COOL_DOWN_UNEXPIRED_MESSAGE("defaults.messages.cool-down-not-expired", SettingValueType.STRING,
COOL_DOWN_UNEXPIRED_MESSAGE("defaults.messages.coolDownUnexpiredMessage", SettingValueType.STRING,
"&cYou've already had your chance! Give me a break!", "coolDownUnexpiredMessage"),
COST_MESSAGE(
"defaults.messages.cost", SettingValueType.STRING,
COST_MESSAGE("defaults.messages.costMessage", SettingValueType.STRING,
"&eIt will cost &a<price> &eto reforge that &a<item>&e! Click again to reforge!", "costMessage"),
FAIL_MESSAGE("defaults.messages.fail-reforge", SettingValueType.STRING, "&cWhoops! Didn't mean to do that! Maybe next time?",
"failReforgeMessage"),
INSUFFICIENT_FUNDS_MESSAGE("defaults.messages.insufficient-funds", SettingValueType.STRING,
FAIL_MESSAGE("defaults.messages.failReforgeMessage", SettingValueType.STRING,
"&cWhoops! Didn't mean to do that! Maybe next time?", "failReforgeMessage"),
INSUFFICIENT_FUNDS_MESSAGE("defaults.messages.insufficientFundsMessage", SettingValueType.STRING,
"&cYou don't have enough money to reforge that item!", "insufficientFundsMessage"),
INVALID_ITEM_MESSAGE("defaults.messages.invalid-item", SettingValueType.STRING,
INVALID_ITEM_MESSAGE("defaults.messages.invalidItemMessage", SettingValueType.STRING,
"&cI'm sorry, but I don't know how to reforge that!", "invalidItemMessage"),
ITEM_UNEXPECTEDLY_CHANGED_MESSAGE("defaults.messages.item-changed-during-reforge", SettingValueType.STRING,
ITEM_UNEXPECTEDLY_CHANGED_MESSAGE("defaults.messages.itemChangedMessage", SettingValueType.STRING,
"&cThat's not the item you wanted to reforge before!", "itemChangedMessage"),
START_REFORGE_MESSAGE("defaults.messages.start-reforge", SettingValueType.STRING,
START_REFORGE_MESSAGE("defaults.messages.startReforgeMessage", SettingValueType.STRING,
"&eOk, let's see what I can do...", "startReforgeMessage"),
SUCCESS_MESSAGE("defaults.messages.successful-reforge", SettingValueType.STRING,
SUCCESS_MESSAGE("defaults.messages.successMessage", SettingValueType.STRING,
"There you go! All better!", "successMessage");
private final String path;

View File

@ -183,7 +183,7 @@ public class NPCSettings {
}
/**
* Gets the minimum delay used to wait for a re-forge to finish.
* Gets the minimum delay used to wait for a reforging to finish.
*
* @return <p>The minimum reforge delay</p>
*/
@ -192,7 +192,7 @@ public class NPCSettings {
}
/**
* Gets the maximum delay used to wait for a re-forge to finish
* Gets the maximum delay used to wait for a reforging to finish
*
* @return <p>The maximum reforge delay</p>
*/
@ -210,7 +210,7 @@ public class NPCSettings {
}
/**
* Gets the chance to fail a re-forge
* Gets the chance to fail a reforging
*
* @return <p>The fail chance</p>
*/
@ -255,7 +255,7 @@ public class NPCSettings {
}
/**
* Gets whether to disable the delay between starting reforging and the re-forge finishing
* Gets whether to disable the delay between starting reforging and the reforging finishing
*
* @return <p>Whether to disable the reforge delay</p>
*/

View File

@ -144,7 +144,7 @@ public enum SmithPreset {
}
/**
* Gets material names of all materials re-forge-able by this smith
* Gets material names of all materials reforge-able by this smith
*
* @return <p>All material names for this smith</p>
*/