VTV2 Documentation/Entity Triggered Events

Entity Triggered Events

Entity events are events that are triggered when something happens, and is caused by an Entity. An Entity can be a Player, a Zombie, or even lit TNT.

Entity Create Portal

This Event is triggered whenever an entity creates a portal. The most typical cause of this event is a player lighting a nether portal, but it also works with End portals.

Scripts for this event belong in the EntityCreatePortal.yml, in /Plugins/Variable Triggers/events/entity/

Placeholders specific to Entity Create Portal

<portaltype>Will be replaced with the type of portal created. NETHER, END.
<entitytype>Will be replaced with the type of entity that created the portal, such as TNT, CREEPER...

Example for Entity Create Portal

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@IF <entitytype> = PLAYER'
- '    @IF <portaltype> = NETHER'
- '        @PLAYER &cYou've opened a portal into hell!'
- '    @ELSE'
- '        @PLAYER &9You've opened a portal into the abyss!'
- '    @ENDIF'
- '@ENDIF'

Entity Explode

This Event is triggered whenever an entity explodes. The most typical cause of this event is creeper exploding, but it also works with tnt and other explosion causes.

Scripts for this event belong in the EntityExplode.yml, in /Plugins/Variable Triggers/events/entity/

Place Holders Specific to Entity Explode Event

<entitytype>Will be replaced with a the type of entity, such as TNT, CREEPER...
<yeild>Will be replaced with the yeild of the explosion.
<explodedblock:amount>Returns the number of exploded blocks.
<explodedblock:index:type>Will be replaced with the name of the block exploded. Index selects which enchantment.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.
<explodedblock:index:byte>Will be replaced with the damagevalue of the block exploded. Index selects which enchantment.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.
<explodedblock:index:location>Will be replaced with the location of the block exploded. Index selects which enchantment.
Replace index> with the drop number you want the placeholder to return. Index starts at zero.

Example for Entity Explode

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@IF <entitytype> = CREEPER'
- '    @BROADCAST &eThatssssss sssome niccccce thingssss you have there!'
- '@ENDIF'

Entity Damage

This Event is triggered whenever an entity takes damage.

Scripts for this event belong in the EntityDamage.yml, in /Plugins/Variable Triggers/events/entity/

Place Holders Specific to Entity Damage Events

<damagedbyplayer>Boolean. Returns true/false based on if the damage done to the entity was done by a player.
<damageamount>Will be replaced by the amount of damage done to the entity.
<damagecause>Will return with how the damage was done to the player.

Example for Entity Damage

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@IF <damagedbyplayer> = true'
- '    @PLAYER &7You did <damageamount> with your <damagecause>!'
- '@ENDIF'

Entity Death

This Event is triggered whenever an entity dies.

Scripts for this event belong in the EntityDeath.yml, in /Plugins/Variable Triggers/events/entity/

Place Holders Specific to Entity Death Events

<droppedexp>Will be replaced with the amount of XP dropped by the killed entity.
<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.

Example for Entity Death

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@EXPLOSION 1 <triggerloc>'

Entity Spawn

This Event is triggered whenever an entity Spawns. Heavy server impact!

Scripts for this event belong in the EntitySpawn.yml, in /Plugins/Variable Triggers/events/entity/

Place Holders Specific to Entity Death Events

<entitytype>Will be replaced with a the type of entity, such as PLAYER, ZOMBIE, VILLAGER...

Example for Entity Spawn

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@IF <entitytype> = CREEPER'
- '@OR <entitytype> = PIG'
- '    @LIGHTNING 0 <triggerloc>'
- '@ENDIF'

Item Despawn

This Event is triggered whenever an item despawns.

Scripts for this event belong in the ItemDespawn.yml, in /Plugins/Variable Triggers/events/entity/

Place Holders Specific to Item Despawn Events

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

Example for Item Despawn

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@POOF 5 <triggerloc>'

Item Spawn

This Event is triggered whenever an item spawns.

Scripts for this event belong in the ItemSpawn.yml, in /Plugins/Variable Triggers/events/entity/

Place Holders Specific to Item Spawn Events

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

Example for Item Spawn

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@FLAMES 5 <triggerloc>'

Lightning Strike

This Event is triggered whenever lightning strikes.

Scripts for this event belong in the LightningStrike.yml, in /Plugins/Variable Triggers/events/entity/

Place Holders Specific to Lightning Strike Events

NoneThere are no placeholders specific to Lightning Strike events. Sorry!

Example for Lightning Strike

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@EXPLOSION 3 <triggerloc>'

Noteblock Play

This Event is triggered whenever a noteblock plays.

Scripts for this event belong in the NoteblockPlay.yml, in /Plugins/Variable Triggers/events/entity/

Place Holders Specific to Lightning Strike Events

NoneThere are no placeholders specific to Noteblock Play events. Sorry!

Example for Lightning Strike

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@FIREWORK BLUE BURST <triggerloc>'

Potion Splash

This Event is triggered whenever a splash potion is used.

Scripts for this event belong in the PotionSplash.yml, in /Plugins/Variable Triggers/events/entity/

Place Holders Specific to Potion Splash Events

<thrower>Returns the type of entity that threw the potion.
player, witch, etc.
<throwername>Returns the name of the entity that threw the potion.
<potion:name>Returns the name of the potion that was thrown.
<potion:displayname>Returns the display name of the potion that was thrown.
<potion:lore:index>Returns the lore of the potion that splashed.
Replace index> with the lore line number you want the placeholder to return. Index starts at zero.
<potion:lore:amount>Returns the number of lines of lore the thrown potion had.
<potion:enchant:index>Returns the enchatment of the potion that splashed, in the format "name_level"
Replace index> with the enchant line number you want the placeholder to return. Index starts at zero.
<potion:enchant:amount>Returns the number of enchantments the thrown potion had.
<potion:effect:index:type>Returns the type of the effect of the potion that splashed. Strength, etc
Replace index> with the effect line number you want the placeholder to return. Index starts at zero.
<potion:effect:index:amplifier>Returns the level of the effect of the potion that splashed.
Replace index> with the effect line number you want the placeholder to return. Index starts at zero.
<potion:effect:index:duration>Returns theduration of the effect of the potion that splashed.
Replace index> with the effect line number you want the placeholder to return. Index starts at zero.
<potion:effect:amount>Returns the number of effects the potion that splashed had.
<affectedentity:index:location>Returns the location of the entity that was splashed.
Replace index> with the entity number you want the placeholder to return. Index starts at zero.
<affectedentity:index:name>Returns the name of the entity that was splashed.
Replace index> with the entity number you want the placeholder to return. Index starts at zero.
<affectedentity:index:type>Returns the type of the entity that was splashed.
Replace index> with the entity number you want the placeholder to return. Index starts at zero.
<affectedentity:amount>Returns the number of entities that were effected by the splash.

Example for Potion Splash

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@IF <thrower> = PLAYER'
- '@AND <potion:name> = Lifestealer'
- '    @SET $Thrower.Temp <throwername>'
- '    @SET $<throwername>.health <health:$Thrower.Temp>'
- '    @ADDINT $<throwername>.health <affectedentity:amount>'
- '    @MODIFYPLAYER <throwername> HEALTH $<throwername>.health'   
- '@ENDIF'

Projectile Hit

This Event is triggered whenever a projectile lands

Scripts for this event belong in the ProjectileHit.yml, in /Plugins/Variable Triggers/events/entity/

Place Holders Specific to Entity Death Events

<projectile>Will be replaced with a the type of projectile.
<projectileshooter>Will be replaced with a the type of entity that shot the projectile, such as PLAYER, SKELETON, GHAST...
<projectileshootername>Will be replaced with a the name of the entity that shot the projectile.

Example for Projectile Hit

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@IF <triggerloc> = 5,10,20'
- '@AND <projectileshooter> = PLAYER'
- '    @PLAYER &6You hit the target with a <projectile>!' 
- '@ENDIF'

Vehicle Enter

This Event is triggered whenever a entity enters a vehicle.

Scripts for this event belong in the VehicleEnter.yml, in /Plugins/Variable Triggers/events/entity/

Place Holders Specific to Vehicle Enter 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, otherwise name will be the same as type.

Example for Vehicle Enter

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@IF <entitytype> = PLAYER'
- '    @BROADCAST <entityname> got in a vehicle!'
- '@ENDIF'

Vehicle Exit

This Event is triggered whenever a entity exits a vehicle.

Scripts for this event belong in the VehicleExit.yml, in /Plugins/Variable Triggers/events/entity/

Place Holders Specific to Vehicle Exit 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, otherwise name will be the same as type.

Example for Vehicle Exit

Worlds:
- world
Cooldown: 0
Cancelled: false
main:
- '@IF <entitytype> = PLAYER'
- '    @BROADCAST <entityname> got out of a vehicle!'
- '@ENDIF'

Comments

Posts Quoted:
Reply
Clear All Quotes