VTV2 Documentation/Player Triggered Events

Entity Triggered Events

Entity events are events that are triggered when something happens, and is caused by a Player.

Player Break Block

This Event is triggered whenever a player breaks a block.

Scripts for this event belong in the PlayerBreakBlock.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Break Block Events

<blockid>Will be replaced with the block ID. As in Wool 35
<blockmaterial>Will be replaced with the block material name. As in Wool wool
<blockdata>Will be replaced with the block data. As in Blue Wool 35:11
<blocklocation>Will be replaced with the location of the block broken or placed.
<blockxp>Will be replaced with amopunt of XP dropped by breaking the block.

Player Place Block

This Event is triggered whenever a player places a block.

Scripts for this event belong in the PlayerPlaceBlock.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Place Block Events

<blockid>Will be replaced with the block ID. As in Wool 35
<blockmaterial>Will be replaced with the block material name. As in Wool wool
<blockdata>Will be replaced with the block data. As in Blue Wool 35:11
<blocklocation>Will be replaced with the location of the block broken or placed.

Player Click block

This Event is triggered whenever a player clicks a block.

Scripts for this event belong in the PlayerClickBlock.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Click Block Events

<clicktype>Will be replaced with RIGHT_CLICK_BLOCK or LEFT_CLICK_BLOCK.
<blockid>Will be replaced with the block ID. As in Wool 35
<blockmaterial>Will be replaced with the block material name. As in Wool wool
<blockdata>Will be replaced with the block data. As in Blue Wool 35:11
<blocktype>Will be replaced with the block type. As in Blue Wool 35:11
<blocklocation>Will be replaced with the location of the block broken or placed.

Player Click Air

This Event is triggered whenever a player clicks air.

Scripts for this event belong in the PlayerClickAir.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Click Air Events

<clicktype>Will be replaced with RIGHT_CLICK_AIR or LEFT_CLICK_AIR.

Player Click Inventory

This Event is triggered whenever a player clicks in an inventory.

Scripts for this event belong in the PlayerClickInventory.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Click Inventory Events

<inventorysize>Returns the size of the inventory. 9, 18, etc.
<clickedslot>The slot number from an Inventory Event
<clickeditem>The material name of the clicked item in an Inventory Event
<clickeditemname>The display name of the clicked item in an Inventory Event
<inventorytitle>The title of the inventory involved in an Inventory Event To test for spaces, use "_"
<clickeditemlore:index>Will be replaced with the lore on the item on the specified line.
Example: <clickeditemlore:<<color red>>0> would return the first line of lore.
<clickeditemenchant:index>Will be replaced with the enchantment on the item on the specified line.
Example: <clickeditemenchant:<<color red>>0> would return the first enchantment.

Player Chat

This Event is triggered whenever a player talks.

Scripts for this event belong in the PlayerChat.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Chat Events

<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

Player Command

This Event is triggered whenever a player issues a command.

Scripts for this event belong in the PlayerCommand.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Command Events

<cmdarg:1 to infinite>Will be replaced with the word at the specified place in the chatline. <cmdarg1> in "replace air stone" would be "air". Variables may be used in place of a number.
<cmdarg1> to infiniteWill be replaced with the word at the specified place in the chatline. <cmdarg1> in "replace air stone" would be "air".

Player Death

This Event is triggered whenever a player dies.

Scripts for this event belong in the PlayerDeath.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Death 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...
<killedbyplayer>Will be replaced with a boolean true | false. Use this before using <killername>.
<killername>Will be replaced with a the name of the player that did the killing or blank if not killed by a player.
<drops:index>Will be replaced with the name of the drop. Index selects which drop.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.
<droppedexp>Will be replaced with the amount of XP dropped by the killed entity.
<isprojectile>Boolean. Returns true/false based on if the killing blow was delivered by a projectile.
<killerentitytype>Will be replaced by the type of entity that killed the entity.
<deathcause>Will be replaced with the cause of the player's death.

Player Respawn

This Event is triggered whenever a player respawns.

Scripts for this event belong in the PlayerRespawn.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Respawn Events

NoneThere are no placeholders specific to Player Respawn events. Sorry!

Player Join

This Event is triggered whenever a player joins the server.

Scripts for this event belong in the PlayerJoin.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Join Events

NoneThere are no placeholders specific to Player Join events. Sorry!

Player Quit

This Event is triggered whenever a player leaves the server.

Scripts for this event belong in the PlayerQuit.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Quit Events

NoneThere are no placeholders specific to Player Quit events. Sorry!

Player Kick

This Event is triggered whenever a player gets kicked from the server.

Scripts for this event belong in the PlayerKick.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Kick Events

NoneThere are no placeholders specific to Player Kick events. Sorry!

Player Flight

This Event is triggered whenever a player starts or stops flying.

Scripts for this event belong in the PlayerFlight.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Flight Events

NoneThere are no placeholders specific to Player Flight events. Sorry!

Player Sneak

This Event is triggered whenever a player starts or stops sneaking.

Scripts for this event belong in the PlayerSneak.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Sneak Events

NoneThere are no placeholders specific to Player Sneak events. Sorry!

Player Sprint

This Event is triggered whenever a player starts or stope sprinting.

Scripts for this event belong in the PlayeSprint.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Sprint Events

NoneThere are no placeholders specific to Player Sprint events. Sorry!

Player Hold Item

This Event is triggered whenever a player changes what item they are holding.

Scripts for this event belong in the PlayerHoldItem.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Hold Item Events

<oldslot>Will be replaced with the name of the previously held item.
<newslot>Will be replaced with the name of the newly held item.

Player Drop Item

This Event is triggered whenever a player drops an item.

Scripts for this event belong in the PlayerDropItem.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Drop Item Events

<droppeditem:name>Will be replaced with a the name of the dropped item.
<droppeditem:displayname>Will be replaced with the display name of the dropped item.
<droppeditem:amount>Will be replaced with the amount items dropped.
<droppeditem:lore:index>Will be replaced with the lore of the dropped item. Index selects which line of lore.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.
<droppeditem:lore:amount>Will be replaced with the number of lines of lore the dropped item has.
<droppeditem:enchant:index>Will be replaced with the enchantment of the dropped item. Index selects which enchantment.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.
<droppeditem:enchant:amount>Will be replaced with the number of enchantments the dropped item has.

Player Enchant

This Event is triggered whenever a player enchants an item.

Scripts for this event belong in the PlayerEnchant.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Enchant Events

<enchanteditem:name>Will be replaced with a the name of the despawned item.
<enchanteditem:displayname>Will be replaced with the display name of the enchanted item.
<enchanteditem:amount>Will be replaced with the number of enchanted items.
<enchanteditem:lore:index>Will be replaced with a the display name of the despawned item.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.
<enchanteditem:lore:amount>Will be replaced with the number of lines of lore on the enchanted item.
<enchanteditem:enchant:index>Will be replaced with the enchantment of the enchanted item Index selects which line of lore.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.

Player Enter Bed

This Event is triggered whenever a player lays in bed.

Scripts for this event belong in the PlayerEnterBed.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Enter Bed Events

NoneThere are no placeholders specific to Player Enter Bed events. Sorry!

Player Exit Bed

This Event is triggered whenever a player gets out of bed.

Scripts for this event belong in the PlayerExitBed.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Exit Bed Events

NoneThere are no placeholders specific to Player Exit Bed events. Sorry!

Player Fill Bucket

This Event is triggered whenever a player fills a bucket.

Scripts for this event belong in the PlayerFillBucket.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Fill Bucket Events

<emptylocation>Replaced by the location of the emptied spot.

Player Empty Bucket

This Event is triggered whenever a player empties a bucket.

Scripts for this event belong in the PlayerEmptyBucket.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Fill Bucket Events

<waterlocation>Replaced by the location of the filled spot.

Player Trigger Pressure Plate

This Event is triggered whenever a player steps on a pressure plate.

Scripts for this event belong in the PlayerTriggerPressurePlate.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Trigger Pressure Plate Events

<blockid>Will be replaced with the block ID. As in Wool 35
<blockmaterial>Will be replaced with the block material name. As in Wool wool
<blockdata>Will be replaced with the block data. As in Blue Wool 35:11
<blocktype>Will be replaced with the block type. As in Blue Wool 35:11
<blocklocation>Will be replaced with the location of the block broken or placed.
<clicktype>Will be replaced with PHYSICAL.

Player World Change

This Event is triggered whenever a player switches worlds.

Scripts for this event belong in the PlayerWorldChange.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player World Change Events

<worldto>World the player is going to. WorldChange Event.
<worldfrom>World the player is comming from. WorldChange Event.

Player Interact

This Event is triggered whenever a player interacts with something.

Scripts for this event belong in the PlayerInteract.yml, in /Plugins/Variable Triggers/events/player/

Place Holders Specific to Player Interact Events

<entitytype>Will be replaced with a the type of entity, such as PLAYER, ZOMBIE, VILLAGER...
<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.

Comments

Posts Quoted:
Reply
Clear All Quotes