Actions
Adding and using Click-Actions in your Holograms
DecentHolograms allows you to add click-actions to individual hologram pages that get executed when the player either left or right-clicks the hologram.
Click Types¶
These click types are used in the addaction
page command to add the action for a specific click type.
LEFT
RIGHT
SHIFT_LEFT
SHIFT_RIGHT
Action Types¶
The following action types are available to use.
MESSAGE:<message>
¶
Sends a message to the player who clicked the hologram.
<message>
- The message to send. Supports Placeholders, including PlaceholderAPI.
Example
MESSAGE:You clicked this Hologram! # Sends "You clicked this Hologram!" to the player.
COMMAND:<command>
¶
Executes a command as the player who clicked the hologram. Should the specified command not start with a /
will it instead be send as a message by the player.
<command>
- The command to execute as the player. Supports Placeholders, including PlaceholderAPI.
Examples
COMMAND:/help # Executes /help as the player.
COMMAND:My name is {player} # Sends "My name is {player}" as the player.
CONSOLE:<command>
¶
Proxy commands cannot be executed by this action!
Executes the specified command through the console.
<command>
- The command to execute as the console. Supports Placeholders, including PlaceholderAPI.
Example
CONSOLE:say {player} clicked on a Hologram! # Executes "/say {player} clicked on a Hologram!" as the console.
CONNECT:<server>
¶
Sends the player who clicked the hologram to the specified Server. This action only works with Servers connected to a BungeeCord/Velocity proxy.
<server>
- Name of the server the player should be connected to.
Example
CONNECT:lobby # Connects the player to the server named "lobby".
TELEPORT:[<world>:]<x>:<y>:<z>[:<yaw>:<pitch>]
¶
Teleports the player who clicked the hologram to the specified coordinates, and optionally world.
[<world>:]
- Optional<world>
to teleport the player to. Defaults to the World the player is in, if not specified.<x>
- X coordinate to teleport the player to.<y>
- Y coordinate to teleport the player to.<z>
- Z coordinate to teleport the player to.[:<yaw>:<pitch>]
- Optional<yaw>
and<pitch>
to set for the teleportation. Defaults to the current Yaw and Pitch of the player if not set.
Example
TELEPORT:0:100:0 # Teleports player to 0,100,0 in the World they are.
TELEPORT:world:0:100:0 # Teleports player to 0,100,0 in World "world".
TELEPORT:0:100:0:-180:0 # Teleports player to 0,100,0 in the World they are, facing North.
TELEPORT:world:0:100:0:-180:0 # Teleports player to 0,100,0 in World "world", facing North.
SOUND:<sound>[:<volume>:<pitch>]
¶
Plays the specified sound, optionally with a set volume and pitch, to the player who clicked the Hologram.
<sound>
- Name of the sound to play. A list of available sounds is found here[:<volume>:<pitch>]
- Optional<volume>
and<pitch>
with both defaulting to 1.0 if not set.
Examples
SOUND:ENTITY_CREEPER_PRIMED # "Creeper Primed" sound at normal volume and pitch.
SOUND:ENTITY_CREEPER_PRIMED:0.5:0.5 # "Creeper Primed" sound at half the volume and pitch.
PERMISSION:<permission>
¶
Checks whether the player who clicked the Hologram has the specified permission. Unlike other actions does this one act differently by stopping any actions after it from executing, should the player not have the permission.
<permission>
- The permission to check.
Examples
PERMISSION:some.permission.here # Checks for permission some.permission.here
NEXT_PAGE[:<hologram>]
¶
Changes the page of the (optionally specified) Hologram to the next one, if one is available.
[:<hologram>]
- Optional Hologram<hologram>
to change the page of. Defaults to the Hologram the player clicked on, if not set.
Examples
NEXT_PAGE # Moves to the next page of the Hologram the player clicks.
NEXT_PAGE:some_hologram # Moves to the next page of the Hologram "some_hologram".
PREV_PAGE[:<hologram>]
¶
Changes the page of the (optionally specified) Hologram to the previous page, if one is available.
[:<hologram>]
- Optional Hologram<hologram>
to change the page of. Defaults to the Hologram the player clicked on, if not set.
Examples
PREV_PAGE # Moves to the previous page of the Hologram the player clicks.
PREV_PAGE:some_hologram # Moves to the previous page of the Hologram "some_hologram".
PAGE:[<hologram>:]<page>
¶
Changes to the specified page on the (optionally specified) Hologram, if one is available.
[<hologram>:]
- Optional Hologram<hologram>
to change the page of. Defaults to the Hologram the player clicked on, if not set.<page>
- Page to switch to on the Hologram.
Examples
PAGE:2 # Switches to page 2 of the Hologram the player clicked.
PAGE:some_hologram:1 # Switches to page 2 of the Hologram "some_hologram".