Skip to content

Command modifiers

AlonsoAliaga edited this page Sep 22, 2023 · 16 revisions

Commands placeholders πŸ’Ž

You'll find information actions available for formats.
PlaceholderAPI is available in all of them except the ones related to SOUNDS or FIREWORK.

Actions for AlonsoJoin allow certain placeholders:

{PLAYER}

  • Replaced with player name

{UUID}

  • Replaced with player uuid

{WORLD}

  • Replaced with world name

{WORLD_UUID}

  • Replaced with world uuid

{X}

  • Replaced with player location (X axis, double)

{Y}

  • Replaced with player location (Y axis, double)

{Z}

  • Replaced with player location (Z axis, double)

It also allows you to use different modifiers for performing the commands:
The modifiers go in the following order:

[VANISH-MODIFIER][CONNECTION-MODIFIER][COMMAND-MODIFIER]command

Command modifiers πŸ’Ž

Available modifiers are:

[PLAYER]

  • Default one, if not specified, command will be run as player.

[CONSOLE]

  • Run command as console. CAUTION!

[CHAT]

  • Makes the player send a message. If command starts with slash, it will be taken as a command.
    Not recommended to use slash, use [PLAYER] instead.

[OP]

  • Run command as player (having OP). Not recommended to use!

[MESSAGE]

  • Send message directly to the player.

[MESSAGE_BROADCAST]

  • Broadcast message for all online players.

[MESSAGE_WORLD_BROADCAST]

  • Broadcast message for all players in player world.

[CENTERED_MESSAGE] (πŸ”° Added in 0.2-BETA)

  • Send centered message directly to the player.
    (Only plain text, cannot be combined with other modifiers)

[CENTERED_MESSAGE_BROADCAST] (πŸ”° Added in 0.2-BETA)

  • Broadcast centered message for all online players.
    (Only plain text, cannot be combined with other modifiers)

[CENTERED_MESSAGE_WORLD_BROADCAST] (πŸ”° Added in 0.2-BETA)

  • Broadcast centered message for all players in player world.
    (Only plain text, cannot be combined with other modifiers)

[SOUND]

  • Send sound to the player. Format: [SOUND]THE_SOUND,volume,pitch
    You can find all available sounds in this site.
    Example: [SOUND]LEVEL_UP,1,1

[SOUND_BROADCAST]

  • Send sound to all online players. Format: [SOUND_BROADCAST]THE_SOUND,volume,pitch
    You can find all available sounds in this site.
    Example: [SOUND_BROADCAST]LEVEL_UP,1,1

[SOUND_WORLD_BROADCAST]

  • Send sound to all players in player's world. Format: [SOUND_WORLD_BROADCAST]THE_SOUND,volume,pitch
    You can find all available sounds in this site.
    Example: [SOUND_WORLD_BROADCAST]LEVEL_UP,1,1

[CUSTOM_SOUND]

  • Send custom sound to the player. Format: [CUSTOM_SOUND]THE_SOUND,volume,pitch,CATEGORY
    You can find all available sounds in this site. Category is optional and depends on your sound.
    Example: [CUSTOM_SOUND]custom.sound.name,1,1,MASTER

[CUSTOM_SOUND_BROADCAST]

  • Send custom sound to all online players. Format: [CUSTOM_SOUND_BROADCAST]THE_SOUND,volume,pitch,CATEGORY
    You can find all available sounds in this site. Category is optional and depends on your sound.
    Example: [CUSTOM_SOUND_BROADCAST]custom.sound.name,1,1,MASTER

[CUSTOM_SOUND_WORLD_BROADCAST]

  • Send custom sound to all players in player's world. Format: [CUSTOM_SOUND_WORLD_BROADCAST]THE_SOUND,volume,pitch,CATEGORY
    You can find all available sounds in this site. Category is optional and depends on your sound.
    Example: [CUSTOM_SOUND_WORLD_BROADCAST]custom.sound.name,1,1,MASTER

[TITLE]

  • Send a title/subtitle to the player. Format: [TITLE]title<SEPARATOR>subtitle
    Example: [TITLE]&cThis is the title!<SEPARATOR><SEPARATOR>&6This is the subtitle!

[TITLE_BROADCAST]

  • Send a title/subtitle to all players. Format: [TITLE_BROADCAST]title<SEPARATOR>subtitle
    Example: [TITLE_BROADCAST]&cThis is the title!<SEPARATOR>&6This is the subtitle!

[TITLE_WORLD_BROADCAST]

  • Send a title/subtitle to all players in player's world. Format: [TITLE_WORLD_BROADCAST]title<SEPARATOR>subtitle
    Example: [TITLE_WORLD_BROADCAST]&cThis is the title!<SEPARATOR>&6This is the subtitle!

[ACTION_BAR]

  • Send a message in action bar to the player. Format: [ACTION_BAR]message
    Example: [ACTION_BAR]&aThis is an action bar message!

[ACTION_BAR_BROADCAST]

  • Send a message in action bar to all players. Format: [ACTION_BAR_BROADCAST]message
    Example: [ACTION_BAR_BROADCAST]&aThis is an action bar message!

[ACTION_BAR_WORLD_BROADCAST]

  • Send a message in action bar to all players in player's world. Format: [ACTION_BAR_WORLD_BROADCAST]message
    Example: [ACTION_BAR_WORLD_BROADCAST]&aThis is an action bar message!

[FIREWORK]

  • Spawns a firework with custom effects. Format: [FIREWORK]TYPE:COLOR:FADE_COLOR:flicker?:trail?
    You can add many effects adding | and repeating the format. To modify power and delay
    you can add power=AMOUNT and delay=AMOUNT
    Effect types can be grabbed from this site. Some may be different in other versions.
    Example: [FIREWORK]CREEPER:GREEN:RED:true:true|STAR:YELLOW:RED:true:true|power=1|delay=5

[JSON]

  • Send json message to the player. Format: [JSON]theJSONmessage
    You can create the json message using this generator.
    Example: [JSON]{"text":"Made by AlonsoAliaga!","bold":true,"color":"dark_purple"}

[JSON_BROADCAST]

  • Send json message to all players. Format: [JSON_BROADCAST]theJSONmessage
    You can create the json message using this generator.
    Example: [JSON_BROADCAST]{"text":"Made by AlonsoAliaga!","bold":true,"color":"dark_purple"}

[JSON_WORLD_BROADCAST]

  • Send json message to all players in player's world. Format: [JSON_WORLD_BROADCAST]theJSONmessage
    You can create the json message using this generator.
    Example: [JSON_WORLD_BROADCAST]{"text":"Made by AlonsoAliaga!","bold":true,"color":"dark_purple"}

[BUNGEE_PLAYER_CHAT]

  • Make player chat in bungeecord level. Format: [BUNGEE_PLAYER_CHAT]message
    ⚠️ Requires AlonsoBungee installed in bungeecord server! ⚠️
    Example: [BUNGEE_PLAYER_CHAT]&6This is a message in bungee!

[BUNGEE_PLAYER_COMMAND]

  • Make player execute a command in bungeecord level. Format: [BUNGEE_PLAYER_COMMAND]command
    Useful if you want player to execute a command not available in spigot, but in bungeecord.
    ⚠️ Requires AlonsoBungee installed in bungeecord server! ⚠️
    Example: [BUNGEE_PLAYER_COMMAND]glist

[BUNGEE_CONSOLE]

  • Execute a command in bungeecord server. Format: [BUNGEE_CONSOLE]command
    ⚠️ Requires AlonsoBungee installed in bungeecord server! ⚠️
    Example: [BUNGEE_CONSOLE]alert This is a console command from spigot!

[BUNGEE_CONNECT] (πŸ”° Added in 0.2-BETA)

  • Send a player to other server. Format: [BUNGEE_CONNECT]server
    ⚠️ Requires AlonsoBungee installed in bungeecord server! ⚠️
    Example: [BUNGEE_CONNECT]skywars-1

[BUNGEE_BROADCAST] (πŸ”° Added in 0.2-BETA)

  • Broadcasts a message (and sound) to all players in specific servers/worlds. Available options:
    once (true/false), this will make the action execute only once until player leaves the network.
    servers, servers and words (in parenthesis) for the message to be sent.
    sound, this will play the first sound available for the players.
    Format: [BUNGEE_BROADCAST]options<SEPARATOR>othersoptions<SEPARATOR>message
    ⚠️ Requires AlonsoBungee installed in bungeecord server! ⚠️
    Example: [BUNGEE_BROADCAST]once=true<SEPARATOR>servers=all(world,spawn)<SEPARATOR>sound=ENTITY_PLAYER_LEVELUP|LEVEL_UP,100,1<SEPARATOR>&4%vault_prefix%&{PLAYER}&4 joined the network!

[BUNGEE_KICK] (πŸ”° Added in 0.2-BETA)

  • Kicks a player from bungeecord. Format: [BUNGEE_KICK]kick-reason
    ⚠️ Requires AlonsoBungee installed in bungeecord server! ⚠️
    Example: [BUNGEE_KICK]&cYou have been kicked

[CLOSE_INVENTORY]

  • Makes player close current inventory. Format: [CLOSE_INVENTORY]
    Example: [CLOSE_INVENTORY]

[LEAVE_VEHICLE]

  • Makes player leave current vehicle. Format: [LEAVE_VEHICLE]
    Example: [LEAVE_VEHICLE]

[AVATAR_MESSAGE] (πŸ”° Added in 0.2-BETA)

  • Receives a message with skin avatar image. Format: [AVATAR_MESSAGE]identifier
    Example: [AVATAR_MESSAGE]default

[AVATAR_MESSAGE_BROADCAST] (πŸ”° Added in 0.2-BETA)

  • Broadcast a message with skin avatar image. Format: [AVATAR_MESSAGE_BROADCAST]identifier
    ignore-player, if set to true it will ignore the original player. (Won't receive the message)
    Example: [AVATAR_MESSAGE_BROADCAST]default|ignore-player=true

[AVATAR_MESSAGE_WORLD_BROADCAST] (πŸ”° Added in 0.2-BETA)

  • Broadcast a message to world players with skin avatar image. Format: [AVATAR_MESSAGE_WORLD_BROADCAST]identifier
    ignore-player, if set to true it will ignore the original player. (Won't receive the message)
    Example: [AVATAR_MESSAGE_WORLD_BROADCAST]default|ignore-player=true

[MINI_MESSAGE] (πŸ”° Added in 0.2-BETA)

  • Sends a message to the player using MiniMessage format. Format: [MINI_MESSAGE]message
    ⚠️ Generate messages with MiniMessage format using this link!
    Example: [MINI_MESSAGE]<rainbow>Welcome to the server <papi:player_name>!

[MINI_MESSAGE_BROADCAST] (πŸ”° Added in 0.2-BETA)

  • Broadcast message to all players using MiniMessage format. Format: [MINI_MESSAGE_BROADCAST]message
    ⚠️ Generate messages with MiniMessage format using this link!
    Example: [MINI_MESSAGE_BROADCAST]<rainbow><papi:player_name> joined the server!!

[MINI_MESSAGE_WORLD_BROADCAST] (πŸ”° Added in 0.2-BETA)

  • Broadcast message to all players in player world using MiniMessage format. Format: [MINI_MESSAGE_WORLD_BROADCAST]message
    ⚠️ Generate messages with MiniMessage format using this link!
    Example: [MINI_MESSAGE_WORLD_BROADCAST]<rainbow><papi:player_name> joined the world!

[BOOK]

  • Opens a book for the player. Format: [BOOK]nameofthebook.txt
    You need to create the book using this generator and follow steps below.\
  1. Create the book as you want.
  2. Click the GENERATE THE COMMAND button.
  3. Copy the command for the versionn of your server.
  4. Paste the content in a .txt file and place it inside the /books/ folder.
  5. Reload the configuration. (Restart recommended)
  6. Use the name of the file in the format.

⚠️ Requires NBTAPI in all versions and ProtocolLib for 1.8.8 - 1.13.x ⚠️
Example: [BOOK]defaultbook.txt

Connection modifiers πŸ’Ž

These modifiers go seeond in the command line.

[FIRST_JOIN]

  • Only run the "command" if player has joined the server for the first time (spigot based).

[KNOWN_PLAYER]

  • Only run the "commmand" if player is NOT NEW in the server (spigot based).

[NORMAL]

  • By default, if specified [NORMAL] or not specified it will run every time the player joins.

Vanish modifiers πŸ’Ž (πŸ”° Added in 0.2-BETA)

These modifiers go third in the command line.
By default, if not specified it will use [NOT_IN_VANISH].

[ALWAYS]

  • It will always run the command. Ignores if player is in vanish or not.

[ONLY_VANISH]

  • Only run the "commmand" if player is on vanish when joined.

[NOT_IN_VANISH]

  • Only run the "commmand" if player is not on vanish when joined. (By default)

⚠️ Make sure you test your commands BEFORE using it with players.

⚠️ AlonsoBungee can be downloaded only on Github. ⚠️

πŸ“› (Not available on SpigotMC.org, at least for now) πŸ“›

Clone this wiki locally