6. Taxation System - Tylwen/ShopGUIPlus-DynaShop GitHub Wiki

The plugin includes a flexible taxation system that automatically applies a tax percentage to all transactions. The collected taxes can be sent to a player account, a system account, or simply removed from the economy.

Configuration

# Tax system configuration
tax:
  enabled: false
  # Destination mode for taxes: "player", "system" or "remove"
  # player: Sends the tax to a real player (must have played on the server)
  # system: Sends the tax to a system account (works even if it's not a real player)
  # remove: Simply removes the money from the economy (does not assign it to anyone)
  mode: "system"
  # Name of the player or account who will receive the taxes
  receiver: "DynaShopBank"
  # Percentage of tax applied on purchases
  buy-rate: 5.0
  # Percentage of tax applied on sales
  sell-rate: 3.0
  # Log transactions in the console
  log-transactions: true

How it works

  1. When a player makes a transaction (buy or sell), a percentage of the price is deducted as tax.
  2. The tax amount is calculated based on the buy-rate (for purchases) or sell-rate (for sales).
  3. The tax is then:
    • Sent to a real player's account (if mode is "player")
    • Sent to a system account (if mode is "system")
    • Simply removed from the economy (if mode is "remove")
  4. The player receives a message indicating the tax amount and destination.
  5. If log-transactions is enabled, all tax transactions are logged in the console.

Examples

Example 1: Bank account

tax:
  enabled: true
  mode: "system"
  receiver: "ServerBank"
  buy-rate: 5.0
  sell-rate: 2.0
  log-transactions: true

Example 2: Tax collector player

tax:
  enabled: true
  mode: "player"
  receiver: "Tylwen"
  buy-rate: 7.5
  sell-rate: 3.5
  log-transactions: true

Example 3: Economic sink (just removes money)

tax:
  enabled: true
  mode: "remove"
  receiver: "Treasury"  # This is just for the message, money is not sent anywhere
  buy-rate: 3.0
  sell-rate: 1.0
  log-transactions: false

⚠️ **GitHub.com Fallback** ⚠️