Player & Target Conditions
Conditions allow ExecutableItems users to settle criteria, conditions, or requirements.
INFO GIFS: The activator used on the GIFS to demonstrate how each condition works is the LOOP activator, that why the error message of the condition appear mutiple times.
You want add player conditions ?
So in the activator part add playerConditions.
And obviously it's targetConditions for the condition of the target.
For conditions that require numerical values, you can assign 2 conditions.
Example: "I want to create a condition that only activates if the value is greater than 50 but less than 250"
So what you would type in the config will be 50 < CONDITION < 250
If a condition fails to be met, you can enable cancelEvent so if a specific condition isn't completed, cancelEvent will run. You can also customize the error message !
You can also run commands if the condition has failed to execute!
Example:
ifSneaking - Not
Description: Checks if the player is sneaking
Example:
Example Situations:
If the player is (not) sneaking, the activator will activate.
If the player is flying and descends by pressing the sneak button, the activator will activate. for ifSneaking
Required: NO (Default: false)
Do not enable ifNotSneaking if the condition ifSneaking is enabled as it does not make sense having both enabled
ifSprinting - Not
Description: Checks if the player is sprinting
Example:
Example Situations:
If the player is (not) sprinting, the activator will activate.
Required: NO (Default: false)
ifFlying - Not
Description: Checks if the player is flying
Example:
Example Situations:
If the player toggles flight by double-clicking the jump button and (not) flies, the activator will activate.
Required: NO (Default: false)
ifBlocking - Not
Description: Checks if the player is holding a shield and right-clicking it (blocking)
Example:
Example Situations:
If the player is (not) blocking with a shield, the activator will activate
Required: NO (Default: false)
ifGliding - Not
Description: Checks if the player is gliding
Example:
Example Situations:
If the player (not) glides midair with an elytra, the activator will activate.
Required: NO (Default: false)
ifSwimming - Not
Description: Checks if the player is swimming (1.13 Aquatic Update)
Example:
Example Situations:
If the player jumps into the water and starts swimming in a freestyle position, the activator will activate.
Required: NO (Default: false)
ifStunned - Not
Description: Checks if the player is stunned
Example:
You can stun a player by running the custom player command STUN_ENABLE
Required: NO (Default: false)
ifIsOnFire - Not
Description: Checks if the player is on fire
Example:
Example Situations:
If the player is (not) on fire by falling in lava / walking on fire, the activator will activate
Required: NO (Default: false)
ifIsInTheAir - Not
Description: Checks if the player is in the air.
Example:
Example Situations:
If the player has (no) blocks under its feet, the activator will activate.
Required: NO (Default: false)
ifPlayerMustBeOnHisTown
SUPPORTS THE FOLLOWING PLUGINS:
Towny
Description: Checks if the player is on his town.
Example:
Required: NO (Default: false)
ifPlayerMustBeOnHisClaim
SUPPORTS THE FOLLOWING PLUGINS:
GriefPrevention
Lands
GriefDefender
Residence
Description: Checks if the player is on a claim he/she has permission at.
Example:
Example Situations:
If the player is on a claim he/she owns, the activator will activate.
If the player is on a claim that he/she does not own but has permission, the activator will activate.
Required: NO (Default: false)
ifPlayerMustBeOnHisClaimOrWilderness
SUPPORTS THE FOLLOWING PLUGINS:
GriefPrevention (It reurns valid if the player is in public claim of GriefPrevention)
Lands
GriefDefender
Residence
Description: Checks if the player is on a claim he/she has permission at or in wilderness.
Example:
Example Situations:
If the player is on a claim he/she owns, the activator will activate.
If the player is on a claim that he/she does not own but has permission, the activator will activate.
if the player is on wilderness the activator will activate.
Required: NO (Default: false)
ifPlayerMustBeOnHisIsland
Description: Checks if the player is on his/her island.
Plugins compatible:
IridiumSkyblock
SuperiorSkyblock2
BentoBox
Example:
Example Situations:
If the player is on his island, the activator will activate.
Required: NO (Default: false)
ifPlayerMustBeOnHisPlot
SUPPORTS THE FOLLOWING PLUGINS:
PlotSquared
Description: Checks if the player is on a plot he/she has permission at.
Example:
Required: NO (Default: false)
ifCursorDistance
Description: Checks if the direction the player looking at is clear or blocked
Example:
Example Situations:
In ">5", as long as there is air beyond 5 blocks in front of you, the activator will activate
In "<5", if there are air blocks 5 blocks ahead of you, the activator will not activate
Required: NO
ifLightLevel
Description: Checks if the player is on a place with the correct light level
Example:
1playerConditions:2ifLightLevel: ==53ifLightLevelMsg: '' #<- Here is where you will add the custom message.Exit with⌃↩
Example Situations:
If the value is
<5
, the activator will only activate if the light level in the player's location is below 5If the value is
<=5
, the activator will only activate if the light level in the player's location is 5 and below.If the value is
==13
, the activator will only activate if the light level in the player's location is 13.If the value is
>5
, the activator will only activate if the light level in the player's location is above 5.If the value is
>=5
, the activator will only activate if the light level in the player's location is 5 and above.
Required: NO
More Info: You can edit the error message by adding this in the file:
ifLightLevelMsg: "&4&lError you need...."
or in ingame.
If the value is ==13
, the activator will only activate if the light level in the player's location is 13.
ifPlayerExp
Description: Checks if the player has the said amount of experience points.
Example:
Example Situations:
If the value is
<120
, the activator will only activate if the player's experience points is below 120If the value is
<=96
, the activator will only activate if the player's experience points is 96 and below.If the value is
==13
, the activator will only activate if the player's experience points is 13.If the value is
>696
, the activator will only activate if the player's experience points is above 696.If the value is
>=45
, the activator will only activate if the player's experience points is 45 and above.
Required: NO
ifPlayerLevel
Description: Checks if the player has the said amount of experience levels.
Example:
Example Situations:
If the value is
<700
, the activator will only activate if the player's experience points is below 700If the value is
<=1296
, the activator will only activate if the player's experience points is 1296 and below.If the value is
==153
, the activator will only activate if the player's experience points is 5.If the value is
>420
, the activator will only activate if the player's experience points is above 420.If the value is
>=99
, the activator will only activate if the player's experience points is 99 and above.
Required: NO
ifPlayerFoodLevel
Description: Checks if the player has the said amount of food
Example:
Example Situations:
If the value is
<10
, the activator will only activate if the player's food is below 10If the value is
<=10
, the activator will only activate if the player's food is 10 and below.If the value is
==10
, the activator will only activate if the player's food is 10.If the value is
>10
, the activator will only activate if the player's food is above 10.If the value is
>=10
, the activator will only activate if the player's food is 10 and above.
Required: NO
ifPlayerHealth
Description: Checks if the player has the said amount of health
Example:
Example Situations:
If the value is
<10
, the activator will only activate if the player's health is below 10If the value is
<=10
, the activator will only activate if the player's health is 10 and below.If the value is
==10
, the activator will only activate if the player's health is 20.If the value is
>10
, the activator will only activate if the player's health is above 10.If the value is
>=10
, the activator will only activate if the player's health is 10 and above.
Required: NO
ifPosX
Description: Checks if the player is in the said X level.
Example:
Example Situations:
If the value is
<700
, the activator will only activate if the player's X-position value is below 700If the value is
<=1296
, the activator will only activate if the player's X-position value is 1296 and below.If the value is
==153
, the activator will only activate if the player's X-position value is 5.If the value is
>420
, the activator will only activate if the player's X-position value is above 420.If the value is
>=99
, the activator will only activate if the player's X-position value is 99 and above.
Required: NO
ifPosY
Description: Checks if the player is in the said Y level.
Example:
Example Situations:
If the value is
<700
, the activator will only activate if the player's Y-position value is below 700If the value is
<=1296
, the activator will only activate if the player's Y-position value is 1296 and below.If the value is
==153
, the activator will only activate if the player's Y-position value is 5.If the value is
>420
, the activator will only activate if the player's Y-position value is above 420.If the value is
>=99
, the activator will only activate if the player's Y-position value is 99 and above.
Required: NO
ifPosZ
Description: Checks if the player is in the said Z level.
Example:
Example Situations:
If the value is
<700
, the activator will only activate if the player's Z-position value is below 700If the value is
<=1296
, the activator will only activate if the player's Z-position value is 1296 and below.If the value is
==153
, the activator will only activate if the player's Z-position value is 5.If the value is
>420
, the activator will only activate if the player's Z-position value is above 420.If the value is
>=99
, the activator will only activate if the player's Z-position value is 99 and above.
Required: NO
ifHasPermission - Not
Description: Checks if the player has (not) the said permission.
Example:
Example Situations:
If the player has the permission
custom.jump.yes
, the activator will activate. If the player does not have that permission, it will not activate.The actual condition is not used in this gif to properly display the behavior of the condition. When you actually use this condition, a specific error relays on you
Required: NO
BEST TESTED WITHOUT OP BECAUSE IF YOU ARE OPPED, YOU HAVE ACCESS TO ANY TYPE OF PERM WHICH MAKES THIS PERMISSION USELESS
ifHasTag - Not
Description: Checks if the player has the selected tag.
Example:
ifTargetBlock - Not
Description: Checks if the player is (not) selecting the said block.
Example:
Example Situations:
If the player is hovering his/her cursour into sand, the activator will activate.
Required: NO
ifIsInTheBlock - Not
Description: Checks if the player is (not) in a block.
Example:
Example Situations:
If the player is in a COBWEB (head or feets), the activator will activate.
As long as the player is not more than 1 block higher from the block the player is in, the activator will activate
Required: NO (Default: false)
For tags specifications, refer to this list:
ifIsOnTheBlock - Not
Description: Checks if the player is (not) standing on a block.
Example:
Example Situations:
If the player has stone under its feet, the activator will activate.
As long as the player is not more than 1 block higher from the block the player is standing at, the activator will activate
Required: NO (Default: false)
For tags specifications, refer to this list:
It supports IA and EB blocks
ifPlayerMounts - Not
Description: Check if the player is (not) mounting the "entity(es) selected"
Example:
ifInBiome - Not
Description: Checks if the player is (not) in the said biome.
Example:
Example Situations:
If the player is in the Birch Forest Biome and the Birch Forest Biome is listed in the list of worlds in the
ifInBiome:
condition, the activator will acitvate.
Required: NO
ifInRegion - Not
Description: Checks if the player is (not) in the said region (WorldGuard Region).
Example:
Example Situations:
If the player is in the "area1" region and the "area1" region is listed in the list of worlds in the
ifInRegion:
condition, the activator will activate.
Required: NO
ifInWorld - Not
Description: Checks if the player is (not) in the said world.
Example:
Example Situations:
If the player is in the nether and the nether is listed in the list of worlds in the
ifInWorld:
condition, the activator activates.
Required: NO
ifPlayerHasEffect
Description: Checks if the player has the effect(s).
Example:
Example Situations:
If the player has speed with at least an amplifier of 0, the activator will activate
List of all effects: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html
Required: NO
ifPlayerNotHasEffect
Description: Checks if the player doesn't have the effect(s).
Example:
ifCanBreakTargetedBlock
Description: Checks if the player can break the targeted block
Example:
Support GriefPrevention, IridiumSkyblock, SuperiorSkyblock, BentoBox, Lands, Worldguard, Towny, ProtectionStones; Residence
ifPlayerHasEffectEquals
Description: Checks if the player has the effect(s). MUST HAVE THE EXACT AMPLIFIER
Example:
Example Situations:
If the player has speed with an amplifier of 1, the activator will activate
List of all effects: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html
Required: NO
ifPlayerHasExecutableItems - Not
Description: Checks if the player has (not) the said ExecutableItems.
Example:
The example above works like this.
You must have an ei item with the id either "test1", "test2" or "test3" on slot 38, the activator runs
You must have an ei item with the id "ddx" on slot 40
Required: NO
Copy correctly the index of the example, some people have asked support, all of them didn't copy correctly the format.
ifPlayerHasItem - Not
Description: Checks if the player has specific items
Example:
Example Situations:
If the diamond helmet is at the slot 39, the activator will activate
Required: NO
Last updated