Improved reload messages and fixed anvil exceptions

This commit is contained in:
Auxilor 2024-06-23 16:13:57 +01:00
parent 37e01b5a0d
commit 0da40cab00
2 changed files with 5 additions and 3 deletions

View File

@ -194,7 +194,9 @@ class AnvilSupport(
if (toDeduct <= 0) {
return FAIL
} else {
leftMeta.damage -= toDeduct * perUnit
val newDamage = leftMeta.damage - toDeduct * perUnit
leftMeta.damage = newDamage.coerceAtLeast(0) // Prevent negative damage
right.amount -= toDeduct
}
} else {

View File

@ -4,8 +4,8 @@ messages:
not-player: "&cThis command must be run by a player"
invalid-command: "&cUnknown subcommand!"
reloaded: "Reloaded!"
reloaded-1203: "Reloaded! You might need to restart your server if you have removed enchantments."
reloaded-121: "Reloaded! Relog if you added enchantments or you will get kicked. Removing enchantments may require a server restart."
reloaded-1203: "Reloaded! &cYou may need to restart your server for some changes to take effect."
reloaded-121: "Reloaded! &cRelog if you added enchantments or you will get kicked. You may need to restart your server for some changes to take effect."
invalid-player: "&cInvalid Player!"
requires-player: "&cRequires a Player!"
enabled-descriptions: "&fYou have successfully &aenabled &fenchantment descriptions!"