Skip to content

➤ Entity conditions

Ssomar edited this page Jan 18, 2021 · 1 revision

How to add entity Conditions ? (exemple)

activators:
  activator1:
    activator: RIGHT_CLICK
    commands:
    - my command here
    conditions:
      entityConditions:
        ifAdult= false
	ifAdultMsg= "&4&l[ExecutableItems] &cThe entity must being adult to active the activator: &6%activator% &cof this item!";

All entity conditions

ifGlowing

  • example:
ifGlowing: true
ifGlowingMsg: "&4&l[ExecutableItems] &cThe entity must glowing to active the activator: &6%activator% &cof this item!"
  • description: The entity must glow to active the activator ?
  • required: No (default false)

ifInvulnerable

  • example:
ifInvulnerable: true
ifInvulnerableMsg: &4&l[ExecutableItems] &cThe entity must being invulnerable to active the activator: &6%activator% &cof this item!"
  • description: The entity must be invulnerable to active the activator ?
  • required: No (default false)

ifName

  • example:
ifName: 
  - superPig the piglin
  - yaBat the super bat
ifNameMsg: "&4&l[ExecutableItems] &cThe entity doesn't have a valid name to active the activator: &6%activator% &cof this item!"
  • description: The entity must have a name who is in the list to active the activator !
  • required: No (default empty list)

ifNotEntityType

  • example:
ifNotEntityType: 
  - ZOMBIE
  - BAT
ifNotEntityTypeMsg: "&4&l[ExecutableItems] &cThe entity hasn't the good type to active the activator: &6%activator% &cof this item!"
  • description: The entity type must be in the list to active the activator !
  • required: No (default empty list)

ifEntityHealth

  • example:
ifEntityHealth: <=5
ifEntityHealthMsg= "&4&l[ExecutableItems] &cThe health of the entity is not valid to active the activator: &6%activator% &cof this item!"
  • option : <, <=, ==, >=, >
  • description: The entity have the valid health to active the activator ?
  • required: No (default no healt condition)

Creeper conditions

ifPowered

  • example:
ifPowered: true
ifPoweredMsg: "&4&l[ExecutableItems] &cThe entity must being powered to active the activator: &6%activator% &cof this item!"
  • description: The entity must being powered to active the activator ?
  • required: No (default false)

Ageable conditions

ifAdult

  • example:
ifAdult: true
ifAdultMsg: "&4&l[ExecutableItems] &cThe entity must being adult to active the activator: &6%activator% &cof this item!"
  • description: The entity must being an adult to active the activator ?
  • required: No (default false)

Ageable conditions

ifBaby

  • example:
ifBaby: true
ifBabyMsg: "&4&l[ExecutableItems] &cThe entity must being baby to active the activator: &6%activator% &cof this item!"
  • description: The entity must being a baby to active the activator ?
  • required: No (default false)