-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
The config.yml file is auto-generated upon first start.
# ──────────────────────────────────────────────────────────────────────────────
# DonationAlertsAPI Plugin Configuration
# ──────────────────────────────────────────────────────────────────────────────
# You can find full documentation here:
# https://github.com/ProTerUga/DonationAlertsAPI/wiki/Configuration
#
# Your DonationAlerts OAuth2 access token.
# Obtain it via the authorization code flow:
# https://www.donationalerts.com/apidoc#authorization__authorization_code
#
# REQUIRED. The plugin won't work without it.
# Step-by-step guide you can find here:
# https://github.com/ProTerUga/DonationAlertsAPI/wiki/Obtaining-access%E2%80%90token
access-token: ""
# These parameters are needed to easily obtain an access token.
# If you already have one and/or you know what to do,
# you don't have to fill in these fields.
# Your OAuth2 application's App ID.
client-id: ""
# Your OAuth2 application's API Key (Client Secret). Keep this private!
client-secret: ""
# The redirect URL configured in your DonationAlerts application.
redirect-uri: http://localhost:8080/callback
# Delay (in seconds) before attempting to reconnect to the Centrifugo WebSocket
# after a disconnection or failure. The plugin will retry indefinitely.
reconnect-delay: 10
# Logging options – control what gets printed to the server console.
log-donations: true # Log each donation received
log-info: true # Log connection status, authentication, subscription events
log-web-socket: false # Log raw WebSocket messages (incoming/outgoing)
# ──────────────────────────────────────────────────────────────────────────────
# Built-in Commands
# ──────────────────────────────────────────────────────────────────────────────
# If you don't want to handle donations via your own code, enable these commands.
# They will run automatically whenever a donation arrives, using the placeholders
# described below. Commands are executed by the console (with full permissions).
enable-builtin-commands: true
# List of commands to execute when a donation is received.
# Available built-in placeholders (case‑sensitive):
# $sender$ - donor's display name
# $amount$ - donation amount (numeric)
# $currency$ - currency code (USD, EUR, RUB, etc.)
# $message$ - donation message (can be empty)
# $recipient_amount$ - actual amount that the recipient received. (numeric)
#
# Also you can use placeholders of PlaceholderAPI.
# This will require a working PlaceholderAPI plugin installed on your server.
# https://github.com/PlaceholderAPI/PlaceholderAPI
# (!) They will NOT be parsed on behalf of any player. Parsing is only performed on --null.
#
# Here are some useful extensions to solve your problems:
# ParseOther - https://api.extendedclip.com/expansions/parseother/
# Javascript - https://api.extendedclip.com/expansions/javascript/
# Math - https://api.extendedclip.com/expansions/math/
#
# Each command is a string exactly as you would type it in the console.
# For Minecraft chat/actionbar/title commands, use the appropriate syntax.
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"}
# ──────────────────────────────────────────────────────────────────────────────
# Messages
# ──────────────────────────────────────────────────────────────────────────────
# All messages sent to players and the console are defined here.
# The plugin uses MiniMessage (Adventure) natively – no legacy color codes (&) are supported.
# You can use any MiniMessage tag: <color>, <gradient>, <bold>, <click>, <hover>, etc.
messages:
prefix: "<dark_gray>[<gradient:#F2A544:#FFDC80>DonationAlertsAPI</gradient>]</dark_gray> "
command:
usage: "Use /donationalertsapi <...>"
unknown: "<red>Unknown command."
dont-have-permission: "<red>You don't have permission to do it."
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."
error: "<red>Failed to reload configuration. Check the console for errors."
status:
connected: "<gray>Connection status: <green>Connected"
not-connected: "<gray>Connection status: <red>Not connected"
test:
usage: "Use /donationalertsapi test <SenderName> <Amount> <Currency> \"<Message>\""
number-format-error: "<red>Invalid format of float number"
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:
usage: "Use /donationalertsapi token <YourClientCode>"
successfully-obtained: "<green>Access token successfully obtained and saved! The plugin will reconnect."
failed: "<red>Failed to exchange code. Check console for details."
# ──────────────────────────────────────────────────────────────────────────────
# MiniMessage Quick Reference
# ──────────────────────────────────────────────────────────────────────────────
# <color> e.g., <red>, <blue>, <#FF00FF>
# <gradient> e.g., <gradient:#FFCF75:#F07832>text</gradient>
# <bold>, <italic> text decorations
# <click:run_command:/command> clickable text
# <hover:show_text:"hover text"> hover tooltips
# <reset> resets all styling
#
# Full documentation: https://docs.papermc.io/adventure/minimessage/format/
# ──────────────────────────────────────────────────────────────────────────────
debug: falseDefault:
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
Default:
client-id: ""
Your OAuth2 application's App ID.
Default:
client-secret: ""
Your OAuth2 application's API Key (Client Secret). Keep this private!
Default:
redirect-uri: http://localhost:8080/callback
The redirect URL configured in your DonationAlerts application.
Default:
reconnect-delay: 10
Delay in seconds before reconnecting after a disconnection.
Default:
log-donations: true
Log each donation to console.
Default:
log-info: true
Log connection status, authentication, subscription events to console.
Default:
log-web-socket: false
Log raw WebSocket messages (incoming/outgoing) to console.
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.
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.
-
$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). Example:Hello! Great server! -
$recipient_amount$- The amount of the donation converted into the recipient's currency. Example:123.45,1000.0
Using PlaceholderAPI
Also you can use placeholders of PlaceholderAPI. This will require a working PlaceholderAPI plugin installed on your server. Parsing is only performed on --null. Here are some useful extensions to solve your problems:
This section is responsible for the localization of the plugin's messages. You can change them as desired.
- The
messages.auth.url-messagesection 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. For complete MiniMessage documentation, visit https://docs.papermc.io/adventure/minimessage/format/
Getting Started
Advanced usage