Skip to content

Built‐in commands and functions

ProTerUga edited this page Jul 21, 2026 · 4 revisions

Built-in commands and functions

What is it?

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

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

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 format namespace: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
    • volume (Optional) - volume of the sound being played
      • Possible values: float between 0.0 and 1.0
      • Default value: 1.0
    • pitch (Optional) - pitch of the sound being played
      • Possible values: float between 0.5 and 2.0
      • Default value: 1.0
    • target (Optional) - to whom the sound will be played.
      • Possible values: this can be either the player's nickname Nickname In 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
  • [message] - send message to player(s). Syntax: <[message]> <target> <text>
    • target - to whom the message will be sent. Nickname or @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. Nickname or @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. Nickname or @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. Nickname or @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. Nickname or @a
    • effect_id - id of minecraft potion effect in the format namespace: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 of 0 corresponds to the level 1 of the effect.
      • Possible values: any integer between 0 and 255
      • Default value: 0
    • ambient - displays particles in a reduced and translucent form
      • Possible values: boolean (true or false)
      • Default value: false
    • particles - whether to show effect particles
      • Possible values: boolean (true or false)
      • Default value: true
    • icon - whether to show the effect icon in the player's interface
      • Possible values: boolean (true or false)
      • Default value: true

Embedded Placeholders

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

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:

Clone this wiki locally