mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-21 14:55:17 +01:00
Improved reload messages and fixed anvil exceptions
This commit is contained in:
parent
37e01b5a0d
commit
0da40cab00
@ -194,7 +194,9 @@ class AnvilSupport(
|
|||||||
if (toDeduct <= 0) {
|
if (toDeduct <= 0) {
|
||||||
return FAIL
|
return FAIL
|
||||||
} else {
|
} else {
|
||||||
leftMeta.damage -= toDeduct * perUnit
|
val newDamage = leftMeta.damage - toDeduct * perUnit
|
||||||
|
leftMeta.damage = newDamage.coerceAtLeast(0) // Prevent negative damage
|
||||||
|
|
||||||
right.amount -= toDeduct
|
right.amount -= toDeduct
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -4,8 +4,8 @@ messages:
|
|||||||
not-player: "&cThis command must be run by a player"
|
not-player: "&cThis command must be run by a player"
|
||||||
invalid-command: "&cUnknown subcommand!"
|
invalid-command: "&cUnknown subcommand!"
|
||||||
reloaded: "Reloaded!"
|
reloaded: "Reloaded!"
|
||||||
reloaded-1203: "Reloaded! You might need to restart your server if you have removed enchantments."
|
reloaded-1203: "Reloaded! &cYou may need to restart your server for some changes to take effect."
|
||||||
reloaded-121: "Reloaded! Relog if you added enchantments or you will get kicked. Removing enchantments may require a server restart."
|
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!"
|
invalid-player: "&cInvalid Player!"
|
||||||
requires-player: "&cRequires a Player!"
|
requires-player: "&cRequires a Player!"
|
||||||
enabled-descriptions: "&fYou have successfully &aenabled &fenchantment descriptions!"
|
enabled-descriptions: "&fYou have successfully &aenabled &fenchantment descriptions!"
|
||||||
|
Loading…
Reference in New Issue
Block a user