-
Notifications
You must be signed in to change notification settings - Fork 0
Built‐in commands and functions
If you don't want to handle donations via your own code, you can use this section.
If you want to work with this, make sure the enable-builtin-commands section is set to true.
Built-in commands are minecraft commands that will be executed on behalf of the console when a donation is received.
The syntax is exactly the same as the syntax of Minecraft commands, except that there is no slash at the beginning of the command.
Built-in functions are special functions that will also be executed on behalf of the plugin when a donation is received, but unlike commands, these functions are provided by the plugin.
They have the following syntax: "[function_name] params..."
List of available built-in functions:
-
[sound]- play sound to player(s). Syntax:<[sound]> <sound_id> [<source_category>] [<volume>] [<pitch>] [<target>]-
sound_id- id of minecraft sound in the formatnamespace:id -
source_category(Optional) - name of minecraft source sound category- Possible values:
ambient,block,hostile,master,music,neutral,player,record,voice,weather - Default value:
master
- Possible values:
-
volume(Optional) - volume of the sound being played- Possible values: float between
0.0and1.0 - Default value:
1.0
- Possible values: float between
-
pitch(Optional) - pitch of the sound being played- Possible values: float between
0.5and2.0 - Default value:
1.0
- Possible values: float between
-
target(Optional) - to whom the sound will be played.- Possible values: this can be either the player's nickname
NicknameIn this case, the sound will only be played to that player if they are online. But it can also be used as a selector@a. In this case, the sound will be played to all online players. - Default value:
@a
- Possible values: this can be either the player's nickname
-
-
[message]- send message to player(s). Syntax:<[message]> <target> <text>-
target- to whom the message will be sent.Nicknameor@a -
text- the text of the message that will be sent. Text may contain MiniMessage formatting.
-
-
[title]- send title message to player(s). Syntax:<[title]> <target> [<text>]-
target- to whom the title message will be sent.Nicknameor@a -
text(Optional) - the text of the title message that will be sent. Text may contain MiniMessage formatting.- Possible values: any string
- Default value: empty string
-
-
[subtitle]- send subtitle message to player(s). Important: Display requires the title to also be displayed. You can use the[title]function variant with an empty string. Syntax:<[subtitle]> <target> <text>-
target- to whom the subtitle message will be sent.Nicknameor@a -
text- the text of the subtitle message that will be sent. Text may contain MiniMessage formatting.
-
-
[times]- set timings for title & subtitle to player(s). Syntax:<[times]> <fadeIn> <stay> <fadeOut>-
fadeIn- time (in ticks) when the title and subtitle of the message appeared -
stay- time (in ticks) during which the title and subtitle of the message will remain on the screen -
fadeOut- time (in ticks) for the message title and subtitle to disappear
-
-
[actionbar]- send actionbar message to player(s). Syntax:<[actionbar]> <target> <text>-
target- to whom the actionbar message will be sent.Nicknameor@a -
text- the text of the actionbar message that will be sent. Text may contain MiniMessage formatting.
-
-
[effect]- apply potion effect to player(s). Syntax:<[effect]> <target> <effect_id> <time> [<level>] [<ambient>] [<particles>] [<icon>]-
target- to whom the potion effect will be applied.Nicknameor@a -
effect_id- id of minecraft potion effect in the formatnamespace:id -
time- time (in ticks) during which the effect will last -
level(Optional) - the level of the effect that will be applied. Important: a value of0corresponds to thelevel 1of the effect.- Possible values: any integer between
0and255 - Default value:
0
- Possible values: any integer between
-
ambient- displays particles in a reduced and translucent form- Possible values: boolean (
trueorfalse) - Default value:
false
- Possible values: boolean (
-
particles- whether to show effect particles- Possible values: boolean (
trueorfalse) - Default value:
true
- Possible values: boolean (
-
icon- whether to show the effect icon in the player's interface- Possible values: boolean (
trueorfalse) - Default value:
true
- Possible values: boolean (
-
When you receive a donation, you have the opportunity to use information associated with the current donation. Embedded playholders are available for this purpose.
They have the following syntax: "$placeholder_name$". All occurrences of such a string will be replaced with the corresponding value it provides.
-
$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:
Getting Started
Advanced usage