docs/Place Holders

Place Holders

To Getting Started

Place Holders are representative of certain in game data. If you place one of these in your script, it will be replaced by the actual in game data that the place holder represents. Place Holders are lowercase and enclosed inside less than (<) greater than (>) symbols. The available place holders are as follows. Keep in mind that place holders are replaced with the value of what the data was at the moment the trigger was activated(walked on or clicked by a player or an Event ) and not what it may be at any moment in the script. For exact values use Functional Place Holders.

General Place Holders

<this>The trigger object itself converted to a name. Can be used as an object or variable name.
<playername>The triggering players name. Can be used as an object or variable name.
<playerdisplayname>The triggering players display name.
<playerlistname>The triggering players tab list name.
<playerprefix>The triggering players prefix.
<playersuffix>The triggering players suffix.
<helditemname>The triggering players held item material name.
<helditemdisplayname>The triggering players held item display name, if it has one.
<itemid>ID of the item in the triggering players hand at the time they set off the trigger.
<playerloc>The triggering players location at the time they set off the trigger.
<triggerloc>the triggers location.
<issneaking>Will replace with boolean true or false depending on if the player is sneaking at the time they set off the trigger.
<issprinting>Will replace with boolean true or false depending on if the triggering player is sprinting at the time they set off the trigger.
<health>Will replace with an integer of the triggering players health at the time they set off the trigger.
<worldname>Is the name of the world the trigger is in. Can be used as an object or variable name.
<biome>This will be replace with the biome at the trigger location. In the case of events such as Respawn it is the biome at the respawn location.
Biomes are all caps with underscores as in EXTREME_HILLS
<gamemode>Is replaced with the gamemode of the triggering player at the time the trigger was activated.

Place Holders Specific to Command Triggers

<cmdname>will be replaced with the name of the command used.
<cmdargcount>Will be replaced with the number of arguments typed after the command.
Arguments are words or characters separated by spaces.
<cmdline>this will be replaced with the entire line of text that is typed after ths command.

These next ones have been deprecated see Functional PH's for Command triggers instead. I will leave them in for now so your existing scripts will not break but you should start using the new form.

<cmdarg1>Will be replaced with the first argument after the command if any
<cmdarg2>Will be replaced with the second argument after the command if any
<cmdarg3>Will be replaced with the third argument after the command if any
<cmdarg4>Will be replaced with the fourth argument after the command if any

Place Holders Specific to PlaterDeath & EntityDeath Events

<whodied>Will be replaced with a the name of the player that died or the type of entity if not a player, such as Zombie, Spider, Pig... To be used with PlayerDeath and EntityDeath Events
<killedbyplayer>Will be replaced with a boolean true | false. Use this before using <killername> To be used with PlayerDeath and EntityDeath Events
<killername>Will be replaced with a the name of the player that did the killing or blank if not killed by a player. To be used with PlayerDeath and EntityDeath Events

Place Holders Specific to BlockBreak & BlockPlaced Events

<blockid>Will be replaced with the block ID. As in Blue Wool 35:11 To be used with BlockBreak and BlockPlaced Events
<blockdata>Will be replaced with the block data. As in Blue Wool 35:11 To be used with BlockBreak and BlockPlaced Events
<blocktype>Will be replaced with the block type. As in Blue Wool 35:11 To be used with BlockBreak and BlockPlaced Events

Place Holders Specific to Interact & EntitySpawn Events

<entitytype>Will be replaced with a the type of entity, such as PLAYER, ZOMBIE, VILLAGER... To be used with Interact & EntitySpawn Events
<entityname>Will be replaced with a the name of the entity, if type is PLAYER then the Players name. For Interact, if type is VILLAGER then name will be their profession (FARMER, BUTCHER...), otherwise name will be the same as type. To be used with Interact & EntitySpawn Events

Place Holders Specific to Player & Server State Events

<weather>Boolean - true for stormy, false for sunny. WeatherChange Event.
<worldto>World the player is going to. WorldChange Event.
<worldfrom>World the player is comming from. WorldChange Event.
<sneaking>Boolean - true if they entered sneak mode, and false if they went out of it. Sneak Event.
<sprinting>Boolean - true if they started sprinting, false if they stopped. Sprint Event.
<flying>Boolean - true if they started flying, false if they landed. Flight Event.

Place Holders Specific to Area Triggers

<areaentered>Is replaced with the name of the area that is just entered
<areaexited>Is replaced with the name of the area that is just exited
These to place holders are very usefull to test what area is being triggerd and also in the cases that you enter or exit an area inside another area.

Place Holders Specific to Chat Event

<chatline>Will be replaced with the text that was typed in the chat window by player.
<chatwordcount>Will be replaced with the number of words typed in chat window

Place Holders Specific to Server Values

<onlineplayeramount>Do I have to explain that one?
To Getting Started