-
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 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)
#
# Each command is a string exactly as you would type it in the console.
# For Minecraft chat/actionbar/title commands, use the appropriate syntax.
#
# In addition, the plugin has several built-in functions
# that will allow you to get more opportunities.
# Usage syntax: "[command_name] params..."
#
# List of built-in functions:
# [sound] - play sound to player(s)
# [message] - send message to player(s)
# [times] - set timings for title & subtitle to player(s)
# [title] - send title message to player(s)
# [subtitle] - send subtitle message to player(s)
# [actionbar] - send actionbar message to player(s)
# [effect] - apply potion effect to player(s)
#
# See more information here:
# https://github.com/ProTerUga/DonationAlertsAPI/wiki/Configuration
commands:
- "[sound] minecraft:entity.player.levelup music 1.0 0.5 $sender$"
- "[message] @a Test <gradient:#ffff00:#ff00ff>DONATION</gradient>!!! <#ff5555>Test \"red\" <reset>and <yellow><bold><italic>YeLlOw<reset><br>$message$"
- "[times] @a 10 100 10"
- "[title] @a <gradient:#fce362:#d14364>>> Donation! <<</gradient>"
- "[subtitle] @a <bold>$sender$<reset> <gray>- <aqua>$amount$ $currency$"
- "[actionbar] @a <green><underlined>+$amount$β"
- "[effect] @a minecraft:levitation 100 0"
- give @a minecraft:diamond 4
- 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.
This is a large section, which is why it was moved to another Wiki page.
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/
Default:
debug: false
The debug section determines whether additional debug messages will be logged to the console.
Getting Started
Advanced usage