- Introduction
- Types
- Usage
- Ranged Values
- Condition Actions
- Composite Conditions
- Universal Attributes
- Additional Conditions
- Conditions
Introduction
Conditions are used to determine whether or not an action may execute.
Conditions can be used in [1]:
When applying multiple conditions, all of them must be met in order for the skill to be executed. Some conditions allow arrays that can be split by commas. Such conditions only require one of the strings in the array to match.
To see how to use the premium only in-line conditions, click here!
Types
Conditions can be broken into four types:
- Entity Conditions: These check the conditions of an entity.
- Location Conditions: These check the conditions at a location. If a location condition is used while an entity is targeted, it will check the conditions at the entity's location.
- Compare conditions: These check for certain conditions between two different "things". For example, "Cuboid" will return true if a target is within a cube where the corners are two coordinates
- Meta conditions: they will not necessarily check against any inherent property of either the caster or a target. For instance, "StringEquals" will return true or false depending on whether two strings match. Those strings can be placeholders that fetch the value from either the caster or a target, but that is just one possible application.
Usage
Conditions can also be used in three different places within a metaskill:
Conditions
Conditions in this section check against the caster or its location.
Conditions:
- health{h=>10}
Checks if the caster has more than 10 health points
Conditions:
- globalscore{objective=Test;v=>10}
In the example above, the globalscore condition will check the caster's global score.
TargetConditions
Conditions in this section check against the inherited target of the metaskill
TargetConditions:
- health{h=>10}
Checks if the inherited targeted entities have more than 10 health points, and only those that do will be inherited as an inherited target by the metaskill. If none do then the metaskill, by default, will not execute.
TargetConditions:
- globalscore{objective=Test;v=>10}
The example above the globalscore condition will check the inherited target's global score. Since globalscore is an entity condition, it will only work if an entity is targeted.
TriggerConditions
Conditions in this section check against the trigger of the metaskill
TargetConditions:
- health{h=>10}
Checks if the trigger of the metaskill has more than 10 health points
Ranged Values
Ranged values use either the format #to# or #-#. You must use "to" instead of "-" if you want to use negative numbers in the range. For:
YourMagnificentSkill:
Conditions:
- altitude{a=1-5}
TargetConditions:
- distance{d=1to10} true
TriggerConditions:
- distance{d=1to10} true
Condition Actions
Condition Actions allow you to do additional things based off of conditions. The default condition action is true
Action | Description |
---|---|
true |
The skill will run if this condition is met |
false |
The skill will not run if this condition is met |
power [multiplier] |
Multiplies the skill's power by the value of multiplier (e.i. power 2.0 would double the skill's power) |
cast [skill] |
Casts an additional skill if the condition is met, without having effect on the execution of original skill |
castinstead [skill] |
Casts a different skill instead if the condition is met |
orElseCast [skill] |
Casts a different skill instead if the condition is not met |
Conditions:
- day true
Skills:
- message{m="It's day!"} @self
Will run only if it's day in the caster's world
Conditions:
- day false
Skills:
- message{m="It's *not* day!"} @self
Will run only if it's not day in the caster's world
The opposite behavior oftrue
ExampleSkill:
Conditions:
- day true
- sunny orElseCast OtherSkill
Skills:
- message{m="It's day and sunny!"} @self
OtherSkill:
Skills:
- message{m="It's day and not sunny!"} @self
If a condition line is not met (the condition is met and the condition action if false or vice versa) no more conditions will be checked
So even if OtherSkill is executed because of thesunny
condition we can be sure that theday
condition is also met, or else no skill would have run at all because
day true
is checked before
sunny orElseCast OtherSkill
YourAwesomeSkill:
Conditions:
- day true
TargetConditions:
- stance{s=defensive} power 0.5
TriggerConditions:
- stance{stance=defensive} power 0.5
- score{objective=test;value=>20} false
- haspotioneffect{type=POISON;level=>0;duration=0to100} true
Composite Conditions
Conditions can also be grouped by parenthesis and evaluated via the AND (&&
) and OR (||
) boolean operators.
Conditions used this way can still have a condition action.
Conditions:
- ((day false || raining true) && onBlock{material=LIME_CONCRETE}) true
The condition is met when it's either raining or not daytime, and, in addition to that, only when the caster is on a LIME_CONCRETE block
The day and raining have their condition action declared, while onBlock uses the default one,
true
Universal Attributes
Every condition shares and can use the following attributes
Attribute | Aliases | Description | Default |
---|---|---|---|
onFailSkill | onFail | The Metaskill to call if this condition does not check | |
onPassSkill | onPass | The Metaskill to call if this condition does check |
Additional Conditions
Links to conditions added by addon plugins. Any conditions from these links will not work without that plugin installed.
Conditions
Condition | Type | Description |
---|---|---|
Altitude | Entity | Tests how far above the ground the target entity is |
Biome | Location | Tests if the target is within the given list of biomes |
BiomeType | Location | Tests for the biome category at a location. |
BlockType | Location | Tests the material type present at the target location |
BlockTypeInRadius | Location | Checks against the amount of specified blocks in a radius around the target location |
Blocking | Entity | Tests if the targeted player is blocking with a shield |
BoundingBoxesOverlap | Compare | Checks if the caster's BoundingBox overlaps with the target's |
BowTension | Meta | Checks the bow tension of when an entity shoots from a bow |
Burning | Entity | Whether or not the target entity is on fire |
Chance | Meta | The chance that the metaskill has to be executed |
Charged | Entity | Checks if the target creeper is charged |
Children | Entity | Tests how many children the caster has |
Color | Entity | Tests the entity's colors |
Crouching | Entity | Whether or not the target entity is crouching |
Cuboid | Compare | Whether the target is within the given cuboid between location1 x location2 |
DamageAmount | Meta | Checks for a range of damage taken |
DamageCause | Meta | Checks the type of the damage cause |
DamageTag | Meta | Checks the tags of the damage cause |
Dawn | Location | If the time is dawn, from 22000 to 2000 in-game time |
Day | Location | If the time is day, from 2000 to 10000 in-game time |
Dimension | Location | If the target location is within a certain dimension |
DirectionalVelocity | Entity | If the target has a velocity matching the given parameters |
Distance | Compare | Whether the distance between the caster and target is within the given range |
DistanceFromLocation | Entity | Whether the distance between the target and a specified location is within a certain range |
DistanceFromPin | Location | Checks if the target is within a certain distance of a specified pin |
DistanceFromSpawn | Location | Whether the distance from the world's spawn point to the target is within the given range |
DistanceFromTrackedLocation | Location | Whether the distance from the tracked location to the caster is within the given range |
Dusk | Location | If the time is dusk, from 14000 to 18000 in-game time. |
EnchantingExperience | Entity | Checks the target player's experience points |
EnchantingLevel | Entity | Checks the target player's experience level |
EnderDragonAlive | Location | Checks if there is at least one EnderDragon alive in the world of the targeted location |
EnderDragonPhase | Entity | Checks if the ender dragon is in a phase or phases |
EntityItemIsSimilar | Entity | Tests if the target item entity is similar to another item |
EntityItemType | Entity | Tests the type of the target item entity |
EntityMaterialType | Entity | Tests the material of the target item entity |
EntityType | Entity | Tests the entity type of the target |
Faction | Entity | Tests for the targets faction |
FallSpeed | Entity | If the fall speed of the target is within the given range |
FieldOfView | Compare | Tests if the target is within the given angle from where the caster is looking |
FoodLevel | Entity | Checks if the target has food within the range |
FoodSaturation | Entity | Checks if the target has food within the range |
Gamemode | Entity | Checks if the target player's gamemode is the specified one |
Gliding | Entity | If the target is gliding |
GlobalScore | Entity | Checks a global scoreboard value |
HasAI | Entity | Checks if the target entity has its AI enabled |
HasAura | Entity | Checks if the target entity has the given aura |
HasAuraStacks | Entity | Tests if the target has the given range of stacks from an aura |
HasAuraType | Entity | Checks if the target entity has the given aura type |
HasCurrency | Entity | If the target has the given amount of vault currency |
HasEnchantment | Entity | Checks if the target entity's equipped item has an enchantment |
HasGravity | Entity | Tests if the target mob has gravity |
HasInventorySpace | Entity | Checks if the target player has empty inventory space |
HasItem | Entity | Tests if the target player has the given number of given material |
HasOffhand | Entity | Checks if the target entity has something in the offhand |
HasOwner | Entity | Tests if the target mob has an owner |
HasParent | Entity | Tests if the target mob has a parent |
HasPassenger | Entity | Checks if the target entity has a passenger |
HasPermission | Entity | Tests if the target player has a permission |
HasPotionEffect | Entity | Tests if the target entity has a potion effect |
HasTag | Entity | Tests if the target has a scoreboard tag |
Health | Entity | Matches the target's health |
HealthPercent | Entity | Matches the target's health percentage or multiplier |
Height | Location | Checks if the target's Y location is within a range |
HeightAbove | Location | Checks if the target's Y location is above a value |
HeightBelow | Location | Checks if the target's Y location is below a given value |
Holding | Entity | Checks if the target is holding a given material(support MythicMobs and MMOItems) |
inClaim | Location | Checks if the target location is inside a claim |
InCombat | Entity | Checks if the target mob is considered in combat |
InPinRegion | Location | Checks if the target location is within a region delimited by two pins |
IsInvulnerable | Entity | Checks whether the target entity is invulnerable |
IsInSurvivalMode | Entity | Checks if the target player is in survival mode |
Inside | Location | Checks if the target has a block over their head |
isBaby | Entity | Checks if the target entity is a baby |
isCaster | Entity | Checks if the target is the caster |
isChild | Entity | Checks if the target is a child of the caster |
isClimbing | Entity | Checks if the target entity is climbing |
IsCreeperPrimed | Entity | Checks if the target creeper is primed to explode |
isFlying | Entity | Checks if the target player is flying |
isFrozen | Entity | Checks if the target entity is frozen |
isLeashed | Entity | Checks if the target has been leashed |
isLiving | Entity | Checks if the target is a living entity |
isMonster | Entity | Checks if the target is a monster |
isMythicMob | Entity | Checks if the target is a MythicMob |
IsParentAlive | Entity | Checks if the parent of the target entity is still alive |
IsParent | Compare | Checks if the target entity is the parent of the caster |
isPlayer | Entity | Checks if the target is a player |
isRaiderPatrolLeader | Entity | Checks if the target entity is the captain of a pillager group |
isSaddled | Entity | Checks if the target entity is saddled |
isTamed | Entity | Checks if the target entity is tamed |
IsUsingSpyglass | Entity | Checks if the target player is using a spyglass |
ItemIsSimilar | Entity | Checks that targeted player's inventory slot if it's similar to an item |
ItemRecharging | Entity | Checks if the target's weapon is recharging |
ItemType | Meta | Checks against the material of the item that triggered the skill |
LastDamageCause | Entity | Checks the target's last damage cause |
LastSignal | Entity | Matches the last signal received by the target mob |
Level | Entity | Checks the target MythicMob's level |
LightLevel | Location | Tests the light level at the target location |
LightLevelFromBlocks | Location | Tests the light level originating from light-emitting blocks at the target location |
LineOfSight | Compare | Tests if the target is within line of sight of the caster |
LineOfSightFromOrigin | Compare | Tests if the target is within line of sight of the caster |
LivingInRadius | Location | Matches a range to how many living entities are in the given radius |
LocalDifficulty | Location | Tests the difficulty scale at the target location |
LookingAt | Entity | Checks if the player is looking at something |
LunarPhase | Location | Checks the target world's lunar phase |
MaterialisOnCooldown | Entity | Checks if the target player's specified material is on cooldown |
MobsInChunk | Location | Matches a range to how many mobs are in the target location's chunk |
MobsInRadius | Location | Checks how many mobs are in a given radius |
MobsInWorld | Location | Matches a range to how many mobs are in the target world |
MobSize | Entity | Checks the size of an entity that can have its size changed |
Moist | Location | Checks if the target block of farmland is hydrated |
MoistureLevel | Location | Checks if the target block of farmland has the specified level of hydratation |
MotionX | Entity | Checks the X motion of the target entity against a range. |
MotionY | Entity | Checks the Y motion of the target entity against a range. |
MotionZ | Entity | Checks the Z motion of the target entity against a range. |
Mounted | Entity | If the target entity is riding a mount/vehicle |
Moving | Entity | If the target has a velocity greater than zero |
MythicMobType | Entity | Checks the MythicMob type of the target mob |
MythicPack | Meta | Checks for the presence of Pack |
MythicPackVersion | Meta | Checks if a pack has a specified version |
MythicPackVersionGreater | Meta | Checks if a pack has a version greater or equal the specified one |
Name | Entity | Checks against the entity's name |
NearClaim | Location | If the target location is near any GriefPrevention claims |
Night | Location | If the time is night, from 14000 to 22000 in-game time |
NotInRegion | Location | If the target location is not within the given WorldGuard region |
OffGCD | Entity | Checks if the target mob has an active Global Cooldown |
OnBlock | Location | Matches the block the target entity is standing on |
OnGround | Entity | If the target entity is standing on solid ground |
OriginDistanceFromPin | Location | Checks if the origin is within a certain distance of a specified pin |
OriginLocation | Meta | Checks if the origin is at a given location |
Outside | Location | If the target has open sky above them |
Owner | Compare | Checks if the target entity is the owner of the caster |
OwnerIsOnline | Entity | Checks if the owner of the target mob is online, if the owner is a player |
Pitch | Entity | Checks if the pitch of the target entity is within a range |
PlayerKills | Entity | Matches how many players the target mob has killed |
PlayerNotWithin | Location | Checks if any players are within a radius of the target |
PlayerWithin | Location | Checks if any players are within a radius of the target |
PlayersInRadius | Entity | Checks how many players are in a radius |
PlayersInWorld | Meta | Matches the number of players in the caster's world |
PlayersOnline | Meta | Matches the number of players online |
Plugin | Meta | Checks if the specified plugin is running on the server |
Premium | Meta | Checks if MythicMobs Premium is running on the server |
Raining | Location | If it's raining in the target world |
Region | Location | If the target is within the given WorldGuard region |
SameFaction | Entity | Tests if the caster and target are in the same faction |
Score | Entity | Checks a scoreboard value of the target entity |
ServerNmsVersion | Meta | Checks if the server is running the specified minecraft NMS version. |
ServerVersion | Meta | Checks if the server is running the specified minecraft version. |
Size | Entity | Checks the size of the target entity |
SkillOnCooldown | Entity | Checks if the given skill is in cooldown for the target |
SpawnReason | Entity | Checks against the spawn reason of the target |
Sprinting | Entity | Checks if the target Player is sprinting |
Stance | Entity | Checks the stance of the target mob |
StringEmpty | Meta | Checks if the provided string is empty |
StringNotEmpty | Meta | Checks if the provided string is not empty |
StringEquals | Meta | Checks if value1 equals value2. Both values can use variables and placeholders. |
Structure | Location | Matches if the target location is inside of a structure |
Sunny | Location | If the weather is sunny in the target world. |
TargetInLineOfSight | Entity | Tests if the target has line of sight to their target |
TargetNotInLineOfSight | Entity | Tests if the target doesn't have line of sight to their target |
TargetWithin | Entity | Tests if the target's target is within a certain distance |
TargetNotWithin | Entity | Tests if the target's target is not within a certain distance |
Targets | Meta | Tests if the number of inherited targets from the parent skilltree matches the given range. |
Thundering | Location | If it's thundering in the target world |
TriggerBlockType | Meta | Checks against the material type that triggered the skill |
TriggerItemType | Meta | Checks against the item material type that triggered the skill |
VariableEquals | Meta | Checks if the given variable has a particular value. |
VariableInRange | Meta | Checks if the given numeric variable is within a certain range. |
VariableIsSet | Meta | Checks if the given variable is set. |
VehicleIsDead | Entity | Checks if the casters mounted vehicle is dead. |
Velocity | Entity | Checks the velocity of the target entity against a range. |
Wearing | Entity | Tests what the target entity has equipped. |
World | Location | Checks the name of the target world. |
WorldTime | Location | Matches a range against the target location's world's time. |
Yaw | Entity | Checks the yaw of the target entity against a range. |
yDiff | Entity | Checks the difference in Y between the targeted entity and the caster. |
More Examples
FlameShock:
Cooldown: 1
Conditions:
- targetwithin 15
- targetinlineofsight true
- incombat
- stance aggressive
- onblock GRASS
- offgcd
Skills:
- gcd{t=60}
- message{m="<mob.name> begins casting a spell"}
- potion{t=SLOW;d=60;l=7}
- delay 60
- message{m="<target.name> &ecombusts"}
- effect:particles{p=flame;a=20;hS=3;vS=1;s=0;y=2}
- potion{t=HARM;d=1;l=1}
[1] Not all conditions may be applicable everywhere.