Fixes some minor issues

Fixes some repositories using http instead of https
Fixes formatting for tables
This commit is contained in:
Kristian Knarvik 2022-11-14 02:44:18 +01:00
parent a036c39dc3
commit 5089a721a0
4 changed files with 50 additions and 50 deletions

View File

@ -49,7 +49,7 @@ In addition to just being able to repair items, blacksmiths have some random fea
## Commands ## Commands
| Command | Arguments | Description | | Command | Arguments | Description |
| --- | --- | --- | |-------------------|-------------------------------|----------------------------------------------------------------------------------------------|
| /blacksmith | \<option> \[new-value] | Changes a configuration option for the selected blacksmith (use Citizens' /npc select first) | | /blacksmith | \<option> \[new-value] | Changes a configuration option for the selected blacksmith (use Citizens' /npc select first) |
| /blacksmithconfig | \<reload/option> \[new-value] | Changes a default/global configuration value | | /blacksmithconfig | \<reload/option> \[new-value] | Changes a default/global configuration value |
| /preset | \<preset>\[:filter] | Displays all materials included in the given preset, after applying the filter if set | | /preset | \<preset>\[:filter] | Displays all materials included in the given preset, after applying the filter if set |
@ -111,7 +111,7 @@ All currently supported presets, and available filters for each preset:
## Permissions ## Permissions
| Permission node | Description | | Permission node | Description |
| --- | --- | |------------------|----------------------------------------------------------|
| blacksmith.admin | Allows overall blacksmith configuration | | blacksmith.admin | Allows overall blacksmith configuration |
| blacksmith.edit | Allows changing settings for the selected blacksmith NPC | | blacksmith.edit | Allows changing settings for the selected blacksmith NPC |
| blacksmith.use | Allows the player to repair items using blacksmiths | | blacksmith.use | Allows the player to repair items using blacksmiths |
@ -121,16 +121,16 @@ All currently supported presets, and available filters for each preset:
### Plugin Options ### Plugin Options
| Key | Value type | Description | | Key | Value type | Description |
| --- | --- | --- | |----------|------------|----------------------------------------------------------------------------------------------|
| language | string | The language used for this plugin. Only "en" is supported, unless you add a custom language. | | language | string | The language used for this plugin. Only "en" is supported, unless you add a custom language. |
### Global-only options ### Global-only options
| Key | Value type | Description | | Key | Value type | Description |
| --- | --- | --- | |-------------------------|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| basePrice | positive decimal number | The base price which has to be paid regardless of the durability remaining for an item. Setting this without specifying a material sets the basePrice for any item the basePrice has not been set for. | | basePrice | positive decimal number | The base price which has to be paid regardless of the durability remaining for an item. Setting this without specifying a material sets the basePrice for any item the basePrice has not been set for. |
| pricePerDurabilityPoint | positive decimal number | The price added for each durability point present/missing (depends on whether natural cost is set to true or false). Setting this without specifying a material sets the pricePerDurabilityPoint for any item the pricePerDurabilityPoint has not been set for. | | pricePerDurabilityPoint | positive decimal number | The price added for each durability point present/missing (depends on whether natural cost is set to true or false). Setting this without specifying a material sets the pricePerDurabilityPoint for any item the pricePerDurabilityPoint has not been set for. |
| enchantmentCost | positive decimal number | The added cost for each level of an enchantment present on the item. The cost can be set for specific enchantments. Not specifying an enchantment sets the value for all enchantments without a set value. | enchantmentCost | positive decimal number | The added cost for each level of an enchantment present on the item. The cost can be set for specific enchantments. Not specifying an enchantment sets the value for all enchantments without a set value. |
| useNaturalCost | true/false | If true, each missing durability will add to the cost (price = basePrice + missingDurability * pricePerDurabilityPoint + enchantmentCost). If false, durability will be used to calculate the cost instead of missingDurability (this was the behavior before natural cost was added). | | useNaturalCost | true/false | If true, each missing durability will add to the cost (price = basePrice + missingDurability * pricePerDurabilityPoint + enchantmentCost). If false, durability will be used to calculate the cost instead of missingDurability (this was the behavior before natural cost was added). |
| showExactTime | true/false | If true, blacksmiths will display exact time remaining in minutes and seconds, instead of vague expressions | | showExactTime | true/false | If true, blacksmiths will display exact time remaining in minutes and seconds, instead of vague expressions |
@ -139,7 +139,7 @@ All currently supported presets, and available filters for each preset:
#### Configuration values #### Configuration values
| Key | Value type | Description | | Key | Value type | Description |
| --- | --- | --- | |------------------------|-----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| dropItem | true/false | Whether the blacksmith should drop the repaired item on the ground (instead of putting it into the player's inventory). | | dropItem | true/false | Whether the blacksmith should drop the repaired item on the ground (instead of putting it into the player's inventory). |
| disableCoolDown | true/false | Whether to completely disable the cool-down between repairs. | | disableCoolDown | true/false | Whether to completely disable the cool-down between repairs. |
| disableDelay | true/false | Whether to completely disable the delay required to reforge an item. | | disableDelay | true/false | Whether to completely disable the delay required to reforge an item. |
@ -156,7 +156,7 @@ All currently supported presets, and available filters for each preset:
#### Messages #### Messages
| Message Key | Explanation | | Message Key | Explanation |
| --- | --- | |--------------------------|-----------------------------------------------------------------------------------------------------------------|
| busyPlayerMessage | The message displayed when the blacksmith is serving another player | | busyPlayerMessage | The message displayed when the blacksmith is serving another player |
| busyReforgeMessage | The message displayed when the blacksmith is busy reforging an item | | busyReforgeMessage | The message displayed when the blacksmith is busy reforging an item |
| coolDownUnexpiredMessage | The message displayed when the player has to wait for the cool-down to expire before using the blacksmith again | | coolDownUnexpiredMessage | The message displayed when the player has to wait for the cool-down to expire before using the blacksmith again |

View File

@ -25,11 +25,11 @@
</repository> </repository>
<repository> <repository>
<id>citizens-repo</id> <id>citizens-repo</id>
<url>http://repo.citizensnpcs.co/</url> <url>https://repo.citizensnpcs.co/</url>
</repository> </repository>
<repository> <repository>
<id>vault-repo</id> <id>vault-repo</id>
<url>http://nexus.hc.to/content/repositories/pub_releases</url> <url>https://nexus.hc.to/content/repositories/pub_releases</url>
</repository> </repository>
</repositories> </repositories>

View File

@ -33,7 +33,7 @@ public class BlackSmithEditTabCompleter implements TabCompleter {
if (args.length == 1) { if (args.length == 1) {
return TabCompletionHelper.filterMatchingContains(npcSettings, args[0]); return TabCompletionHelper.filterMatchingContains(npcSettings, args[0]);
} else { } else {
if (npcSettings.contains(args[0]) && args.length <= 2) { if (npcSettings.contains(args[0]) && args.length == 2) {
return tabCompleteCommandValues(args[0], args[1]); return tabCompleteCommandValues(args[0], args[1]);
} else { } else {
return new ArrayList<>(); return new ArrayList<>();

View File

@ -85,7 +85,7 @@ public final class TypeValidationHelper {
* @return <p>True if the value is a non-empty string</p> * @return <p>True if the value is a non-empty string</p>
*/ */
private static boolean isNonEmptyString(Object value, CommandSender sender) { private static boolean isNonEmptyString(Object value, CommandSender sender) {
boolean isString = value instanceof String string && !string.strip().isEmpty(); boolean isString = value instanceof String string && !string.isBlank();
if (!isString && sender != null) { if (!isString && sender != null) {
BlacksmithPlugin.getStringFormatter().displayErrorMessage(sender, BlacksmithPlugin.getStringFormatter().displayErrorMessage(sender,
BlacksmithTranslatableMessage.INPUT_STRING_REQUIRED); BlacksmithTranslatableMessage.INPUT_STRING_REQUIRED);