Skip to content

Conditions

muhahahahe edited this page Jan 8, 2018 · 73 revisions

Use the listed conditions the same way it is discribed on the conditions manual of MythicMobs

General Conditions:

- biomefix{b=[SINGLE/ARRAY];action=[BOOLEAN]}
checks the casters or targets biome
example: - biomefix{b=DESERT,PLAINS;action=true}

- facingdirection{d=[CARDINAL-POINT];action=[BOOLEAN]}
checks if the target looks in a specific direction
example: - facingdirection{f=SOUTH_WEST;action=true}

- factionsflag{flag=[SINGLE/ARRAY];action=[BOOLEAN]}
checks if the faction has a specific flag set or unset
example: - factionsflag{flag=firespread;action=false}

- hastarget{action=[BOOLEAN]}
checks if the caster has a target
NOTE: *This only works on the caster, if you use it
            in a TargetConditions it will throw an error!*
example: - hastarget{action=true}

- inmobarena
checks if the caster, target, or location is in a Mob Arena
Requires the MobArena Plugin

- inmotion{action=[BOOLEAN]}
checks if the target is in motion
wont work on non-living entities or players
example: - inmotion{action=true}

- isstunned{action=[BOOLEAN]}
checks if the caster or target is stunned
This works also as TargetConditions: keep in mind to set the right targeter.
example: - isstunned{action=true}

- lastdamagecause{cause=[BukkitDamageCause];damager=[BukkitEntityType];action=[BOOLEAN]}
checks the last damage event on the caster or target
Note: entity for check must be a MythicMob
example: - lastdamagecause{cause=PROJECTILE;damager=PLAYER;action=true}

- mobsinradius{mobtypes=[SINGLE/ARRAY/ALL];a=[NUMERIC/NUMERIC-RANGE];r=[NUMERIC];action=[BOOLEAN]}
checks the amount of mobs in a given area around the caster/target/location
example: - mobsinradius{m=ALL;a=5to10;r=20;action=TRUE}

- wgdenyspawnflag{types=[BukkitEntityType];action=[BOOLEAN]}
checks if the region has denied the spawning of defined entities(usually used in randomspawns)
example: - wgdenyspawnflag{types=ZOMBIE,SKELETON;action=false}

- wgstateflag{flag=[WorldGuardFlag];action=[BOOLEAN]}
checks if the region has set the defined flag
example: - wgstateflag{flag=mob-spawning;action=false}


Compare Conditions:

- attackable{cause=[BukkitEntityDamageEvent];action=[BOOLEAN]}
checks if the target is attackable by the caster with this DamageEvent
example: - attackable{cause=PROJECTILE;action=false}

- behind{view=[ANGLE_VALUE];action=[BOOLEAN]}
checks if the caster is behind of its target
example: - behind{view=90;action=true}

- damageable{cause=[BukkitEntityDamageEvent];action=[BOOLEAN]}
checks if the target is damageable with this DamageEvent
example: - damageable{cause=PROJECTILE;action=true}

- hasmeta{meta="tag=[TAGNAME];value=[TAGVALUE];type=[BOOLEAN/NUMERIC/STRING]";compareself=[BOOLEAN];action=[BOOLEAN]}
compares the meta of 2 entities, can also used on caster itself
example: - hasmeta{meta="tag=lastdamagedentity;value=<target.uuid>;
                  type=STRING";cs=true;action=true}

- infront{view=[ANGLE-VALUE];action=[BOOLEAN]}
checks if the caster is infront of its target
example: - infront{view=10;action=false}

- lookatme{fov=[DOUBLE];yo=[DOUBLE];debug=[BOOLEAN]}
checks if the target is looking at the caster
the example uses the default values that are fine for almost any entity

with debug set to true you will get a console output with the fov and yoexample: - lookatme{fov=1.999;yo=-0.4}

- ownsitem{list="where=[ANY/HAND/ARMOR/INVENTORY]";material=[ANY/MATERIALTYPE];amount=[VALUE/VALUE-RANGE];lore=[LORETEXT]";action=[BOOLEAN]}
checks one or multiple slots (seperated by && for AND or || for OR)
of the target if it has an item or material
example: - ownsitem{list="where=HAND;material=DIAMOND_SWORD;amount=1 && where=INVENTORY;material=DIAMOND_SWORD;amount=1to2";action=true}

- ownsitemsimple{where=[ANY/HAND/ARMOR/INVENTORY];material=[ANY/MATERIALTYPE];amount=[VALUE/VALUE-RANGE];lore=[LORETEXT];action=[BOOLEAN]}
same as ownsitem but can only check 1 slot
example: - ownsitemsimple{where=HAND;material=SAND;amount=1;action=true}

- parsedstance{s="<variable>";cs=[BOOLEAN];action=[BOOLEAN]}
this condition can check if a variable is set as a stance
usefull with parsedstance mechanic
(NOTE: if cs is set to true it will always check the caster)
example: - parsedstance{s="<target.uuid>";cs=true;action=true}

- relativedirection{angle=[VALUE/VALUE-RANGE];action=[BOOLEAN]}
checks the direction to the target from the caster
example: - relativedirection{angle=90;action=false}

- vdistance{d=[NUMERIC];action=[BOOLEAN]}
checks the height between target and caster
example: - vdistance{d=2to3;action=true}
Clone this wiki locally