Skip to content

Command modifiers

AlonsoAliaga edited this page Mar 1, 2023 · 2 revisions

Commands placeholders 💎

You'll find information about items that allows you to run commands on click.
PlaceholderAPI is available in all of them except the ones related to SOUNDS.

💠 These modifiers are available only where it's explicit stated!
Commands for winners and losers allows you to use all of them.

Commands allows 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 modifier goes at the beginning of the command like:

[MODIFIER]thecommand

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.

[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!

[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]

[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

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

📛 (Not available on SpigotMC.org, at least for now) 📛