Skip to content

[Feature Request] Add an option to prevent negative balances #67

@Cr4zyGeek

Description

@Cr4zyGeek

First of all, thank you for developing CoinsEngine. It’s a powerful and reliable tool for server economy management, and I really appreciate the work you’ve put into it!

I would like to suggest a small improvement regarding how balances are handled in the backend.

Description

Currently, CoinsEngine allows player balances to drop below zero in the backend. While the visual display often rounds or hides this, internal transactions (via commands or API) can still result in a negative value if a player is charged more than they possess.

I would like to suggest an option to enforce a "hard floor" (zero) for all transactions to ensure economic stability.

Proposed Solution

Add a configuration setting in config.yml (either globally or per currency) to toggle negative balances:

  allow-negative-balance: BOOLEAN # If false, transactions that would result in < 0 are cancelled or capped at 0.
  min-balande: INT

Functional Details

  • Transaction Validation: Before a "take" or "withdraw" operation is completed, the plugin should check if the player has sufficient funds.

  • Command Feedback: If a player tries to pay/spend more than they have, the plugin should return an error message (e.g., "Insufficient funds") instead of processing the transaction into the negatives.

Why this is needed

This would prevent "debt" issues on survival or competitive servers where players might exploit certain mechanics to bypass the zero-limit, making economic management much easier for server administrators.

Best regards,
Crazy_Geek

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions