Entity Conditions
entityConditions:
ifAdult: true
ifAdultMsg: "&cMy custom error message here"
ifAdultCancel: true
ifAdultCmds:
- say no
ifAdult
Description: Checks if the entity is in it's adult phase
Example:
entityConditions:
ifAdult: false
ifAdultMsg: '' #<- Here is where you will add the custom message.
Example Situations:
If the sheep is in it's adult phase, the activator will activate.
Required: NO (Default: false)
ifBaby
Description: Checks if the entity is in it's baby phase
Example:
entityConditions:
ifBaby: false
ifBabyMsg: '' #<- Here is where you will add the custom message.
Example Situations:
If the cow is in it's baby phase, the activator will activate.
Required: NO (Default: false)
ifFrozen
Description: Checks if the entity is frozen (works for 1.18 and upper versions)
Example:
entityConditions:
ifFrozen: true
ifFrozenMsg: 'ðe entity is frozen'
ifFrozenCancel: false
ifGlowing
Description: Checks if the entity has the glowing effect
Example:
entityConditions:
ifGlowing: false
ifGlowingMsg: '' #<- Here is where you will add the custom message.
Example Situations:
If the entity is glowing, the activator will activate.
Required: NO (Default: false)
ifHasAI - ifNotHasAI
Description: Checks if the entity has AI
Example:
entityConditions:
ifHasAI : false
ifHasAIMsg: '' #<- Here is where you will add the custom message.
ifInvulnerable
Description: Checks if the entity has the invulnerable attribute
Example:
entityConditions:
ifInvulnerable: false
ifInvulnerableMsg: '' #<- Here is where you will add the custom message.
Example Situations:
If the villager is invulnerable, the activator will activate.
Required: NO (Default: false)
ifNamed - ifNotNamed
Description: Checks if the entity is named (for example when using a nametag in a mob)
Example:
entityConditions:
ifNamed: true
ifNamedMsg: '&4&l&o[ExecutableItems] &cThe entity must be named to active the activator: &6%activator% &cof this item!'
ifOnFire
Description: Checks if the entity is on fire
Example:
entityConditions:
ifOnFire: false
ifOnFireMsg: '' #<- Here is where you will add the custom message.
Example Situations:
If the villager is burning, the activator will activate
Required: NO (Default: false)
ifPowered
Description: Checks if the entity is charged
Example:
entityConditions:
ifPowered: false
ifPoweredMsg: '' #<- Here is where you will add the custom message.
Example Situations:
If the creeper is charged, the activator will activate.
Required: NO (Default: false)
ifTamed - ifNotTamed
Description: Checks if the entity is tamed
Example:
entityConditions:
ifTamed: true
ifTamedMsg: '&4&l&o[ExecutableItems] &cThe entity must be tamed to active the activator: &6%activator% &cof this item!'
ifEntityHealth
Description: Checks if the entity has the said health.
Example:
entityConditions:
ifEntityHealth: <=15
ifEntityHealthMsg: '' #<- Here is where you will add the custom message.
Example Situations:
If the value is
<66
, the activator will only activate if the entity's health is below 66If the value is
<928
, the activator will only activate if the entity's health is 928 and below.If the value is
==76
, the activator will only activate if the entity's health is 76.If the value is
>123
, the activator will only activate if the entity's health is above 123.If the value is
>=40000
, the activator will only activate if the entity's health is 40000 and above.
Required: NO
ifHasTag - Not
Description: Checks if the entity has (not) specifics tags
Specifically the tag nbt from
/summon armor_stand ~ ~ ~ {Tags:["Pikamee"]}
Example:
entityConditions:
ifHasTag:
- Watame
- Okayu
ifHasTagMsg: '' #<- Here is where you will add the custom message.
ifNotHasTag:
- myBlacklistTag
ifNotHasTagMsg: '' #<- Here is where you will add the custom message.
Required: NO
ifSheepColor:
Description: Checks if the entity has the correct sheep color
Example:
entityConditions:
ifSheepColor:
- green
- BLACK
- yElloW
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/DyeColor.html
ifIsOnTheBlock - Not
Description: Checks if the entity is (not) standing on a block.
Example:
entityConditions:
ifIsOnTheBlock:
- STONE
ifIsOnTheBlockMsg: '' #<- Here is where you will add the custom message.
ifIsNotOnTheBlock:
- BEDROCK
ifIsNotOnTheBlockMsg: '' #<- Here is where you will add the custom message.
Example Situations:
If the entity has stone under its feet, the activator will activate.
As long as the entity is not more than 1 block higher from the block the player is standing at, the activator will activate
Required: NO (Default: false)
ifName
Description: Checks if the entity's name matches the listed names in the condition
Example:
entityConditions:
ifName:
- Watame
- Okayu
ifNameMsg: '' #<- Here is where you will add the custom message.
Example Situations:
If the parrot is named, "John Cena", and the name "John Cena" is listed in the list of names in the ifName condition, the activator will activate.
Required: NO
ifNotEntityType
Description: Checks if the entity type of the entity is not the same as the list of types listed in the condition.
Example:
entityConditions:
ifNotEntityType:
- ZOMBIE
- SKELETON
- HUSK
ifNotEntityTypeMsg: '' #<- Here is where you will add the custom message.
Example Situations:
If the entity type of the entity you targeted is a cow and it's listed in the ifNotEntityType condition list, the activator will not activate.
Required: NO
ifFromSpawner - Not
Description: Checks if the entity spawned from a spawner
Example:
entityConditions:
ifFromSpawner: true
ifFromSpawnerMsg: error
ifFromSpawnerCancel: true
ifNotFromSpawner: true
ifHasTagMsg: ''
ifNotFromSpawnerMsg: error2
ifNotFromSpawnerCancel: true
ifHasSaddle - Not
Description: Checks if the entity is equipped with a saddle
Example:
entityConditions:
ifHasSaddle: true
ifNotHasSaddle: true
ifIsOnTheBlock - Not
Description: Checks if the entity is standing on the said block
Example:
entityConditions:
ifIsOnTheBlock:
blocks:
- STONE
ifIsNotOnTheBlock:
material0:
material: ACACIA_BUTTON
ifNotEntityType
Description: Checks if the target entity is not the said entity
Example:
entityConditions:
ifNotEntityType:
- ZOMBIE_HORSE
Last updated