Merge pull request #24 from SKBotNL/withdrawfix

Fix incorrect calculation of change on withdraw
This commit was merged in pull request #24.
This commit is contained in:
NotAlexNoyle authored and GitHub committed 2026-02-13 16:06:56 +00:00
commit 9ac8b89f5e
1 file changed
+1 -2
@@ -110,8 +110,7 @@ internal class Withdraw : CommandExecutor {
}
val diamondsToAdd = floor(shardsToWithdraw / 9.0).toInt()
val diamondsRemainder = shardsToWithdraw.toInt() % 9
val shardsChange = if (diamondsRemainder == 0) 0 else 9 - diamondsRemainder
val shardsChange = shardsToWithdraw.toInt() % 9
if (
inventorySnapshot.addItem(ItemStack(Material.DIAMOND, diamondsToAdd)).isNotEmpty() ||