Skip to content

Fix deposits rejected when account has negative balance - #6515

Merged
mdcfe merged 1 commit into
EssentialsX:2.xfrom
JRoy:fix/5606-negative-deposit
May 4, 2026
Merged

Fix deposits rejected when account has negative balance#6515
mdcfe merged 1 commit into
EssentialsX:2.xfrom
JRoy:fix/5606-negative-deposit

Conversation

@JRoy

@JRoyJRoy commented Apr 12, 2026

Copy link
Copy Markdown
Member

Economy.add() delegated to setMoney() which checks minMoney and loan
permission against the resulting balance. Both checks reject negative
results even when the balance is improving from a deposit. Since
deposits can only move the balance upward, route them directly to
user.setMoney() bypassing the floor/loan checks. Withdrawals still
go through setMoney() with full validation.

Fixes#5606

Economy.add() delegated to setMoney() which checks minMoney and loan
permission against the resulting balance. Both checks reject negative
results even when the balance is improving from a deposit. Since
deposits can only move the balance upward, route them directly to
user.setMoney() bypassing the floor/loan checks. Withdrawals still
go through setMoney() with full validation.
FixesEssentialsX#5606
@JRoyJRoy closed this May 3, 2026
@JRoy
JRoy deleted the fix/5606-negative-deposit branch May 3, 2026 01:05
@JRoy
JRoy restored the fix/5606-negative-deposit branch May 3, 2026 01:05
@JRoyJRoy reopened this May 3, 2026
@mdcfe
mdcfe added this pull request to the merge queueMay 4, 2026
Merged via the queue into EssentialsX:2.x with commit c38c925May 4, 2026
2 checks passed
@mdcfe
mdcfe deleted the fix/5606-negative-deposit branch May 4, 2026 08:29
Euphillya added a commit to Euphillya/Essentials-Folia that referenced this pull request May 6, 2026
EssentialsX@5c45ee2 Add /jailedplayers command to list jailed players (EssentialsX#6517)
EssentialsX@24b7285 fix: reset nickname when player changes Minecraft account name (EssentialsX#6470)
fix: reset nickname when player changes Minecraft account name (EssentialsX#6470) Add lunge to /enchant (EssentialsX#6534)
EssentialsX@39bc0fe Send geoip join messages to console (EssentialsX#6523)
EssentialsX@5db483b Fix Discord Link RoleSyncManager thread leak (EssentialsX#6512)
EssentialsX@79d67e9 Fix essentials.home.bed permission being ignored (EssentialsX#6516)
EssentialsX@c38c925 Fix deposits rejected when account has negative balance (EssentialsX#6515)
@mdcfemdcfe added this to the 2.22.0 milestone May 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When Tax account is negative essentials denies payments to it EssentialsX Economy: FAILURE - Loan was not permitted!

2 participants

@JRoy@mdcfe