Skip to content

Configuration

ProTerUga edited this page Jul 17, 2026 · 13 revisions

Configuration

access-token

Default: access-token: ""

Required. Your OAuth2 token from DonationAlerts. REQUIRED. The plugin won't work without it. Step-by-step guide you can find here: Obtaining access-token Guide

client-id

Default: client-id: ""

Your OAuth2 application's App ID.

client-secret

Default: client-secret: ""

Your OAuth2 application's API Key (Client Secret). Keep this private!

redirect-uri

Default: redirect-uri: http://localhost:8080/callback

The redirect URL configured in your DonationAlerts application.

reconnect-delay

Default: reconnect-delay: 10

Delay in seconds before reconnecting after a disconnection.

log-donations

Default: log-donations: true

Log each donation to console.

log-info

Default: log-info: true

Log connection status, authentication, subscription events to console.

log-web-socket

Default: log-web-socket: false

Log raw WebSocket messages (incoming/outgoing) to console.

enable-builtin-commands

Default: enable-builtin-commands: true

If you don't want to handle donations via your own code, enable this option. When a donation arrives, the plugin will automatically execute a list of commands as the console (with full permissions).

commands

Default:

commands:
  - title @a title {"text":">> Donation! <<","color":"gold"}
  - title @a subtitle {"text":"$sender$ - $amount$ $currency$"}
  - tellraw @a {"text":"[DONATION] $sender$ - $message$"}
  - playsound minecraft:entity.experience_orb.pickup master @a
  - tellraw $sender$ {"text":"❤ Thanks for donation!","color":"green"}

Each command is a string exactly as you would type it in the console.

Available Placeholders

  • $sender$ - Sender's username. Example: ProTerUga
  • $amount$ - Donation amount (numeric). Example: 5.00
  • $currency$ - Currency code. Example: USD, EUR, RUB
  • $message$ - Donation message (can be empty): Hello! Great server!

Messages

Default:

messages:
  prefix: "<dark_gray>[<gradient:#F2A544:#FFDC80>DonationAlertsAPI</gradient>]</dark_gray> "
  reload:
    successfully-reloaded: "<green>Configuration reloaded!"
    successfully-connected: "<green>Successfully connected to DonationAlerts!"
    reconnect-trying: "<yellow>Reconnecting... Check result in a few seconds."
    missing-token: "<red>Cannot connect: access-token is missing."
    connection-failed: "<red>Connection failed. Check console for errors."
  status:
    connected: "<gray>Connection status: <green>Connected"
    not-connected: "<gray>Connection status: <red>Not connected"
  test:
    connection-warning: "<yellow>Warning! DonationAlerts is NOT connected!"
    donation: "<green>The donation was successfully triggered."
  auth:
    missing-client-id: "<red> Client ID is not set in config.yml. Please set it and reload."
    url-message: '<aqua>Open this URL in your browser and copy an authorization code
          from the search bar (...?code=<code>): <underlined><white><click:open_url:''$url$''><hover:show_text:''Click''>$url$<reset><br>
          <aqua>After that, run at console /daapi token <code>'
  token:
    empty-code: "<red>Code cannot be empty."
    successfully-obtained: "<green>Access token successfully obtained and saved! The plugin will reconnect."
    failed: "<red>Failed to exchange code. Check console for details."

In addition:

  • The messages.auth.url-message section has a $url$ placeholder, which will be replaced with the corresponding url.

All messages sent to players and the console are defined here. The plugin uses MiniMessage (Adventure) natively — legacy color codes (&) are not supported.

Full Documentation

For complete MiniMessage documentation, visit: https://docs.papermc.io/adventure/minimessage/format/

Clone this wiki locally