➤ Player Conditions - ssomar1607/ExecutableItems GitHub Wiki
How to add player Conditions ? (exemple)
activators:
activator1:
activator: RIGHT_CLICK
commands:
- my command here
conditions:
playerConditions:
ifSneaking: true
ifSneakingMsg: "&4&l[ExecutableItems] &cYou must sneak to active the activator: &6%activator% &cof this item!"
ifSneaking
- example:
ifSneaking: true
ifSneakingMsg: "&4&l[ExecutableItems] &cYou must sneak to active the activator: &6%activator% &cof this item!"
- description: The player must sneak to active the activator ?
- required: No (default false)
ifNotSneaking
- example:
ifNotSneaking: true
ifNotSneakingMsg: "&4&l[ExecutableItems] &cYou must not sneak to active the activator: &6%activator% &cof this item!"
- description: The player must not sneak to active the activator ?
- required: No (default false)
ifSwimming
- example:
ifSwimming: true
ifSwimmingMsg: "&4&l[ExecutableItems] &cYou must swin to active the activator: &6%activator% &cof this item!"
- description: The player must swim to active the activator ?
- required: No (default false)
ifGliding
- example:
ifGliding: true
ifGlidingMsg: "&4&l[ExecutableItems] &cYou must glide to active the activator: &6%activator% &cof this item!"
- description: The player must glide to active the activator ?
- required: No (default false)
ifFlying
- example:
ifFlying: true
ifFlyingMsg: "&4&l[ExecutableItems] &cYou must fly to active the activator: &6%activator% &cof this item!"
- description: The player must fly to active the activator ?
- required: No (default false)
ifInWorld
- example:
ifInWorld:
- MyWorld
- MyOtherWorld
ifInWorldMsg: "&4&l[ExecutableItems] &cYou aren't in the good world to active the activator: &6%activator% &cof this item!"
- description: The player must be in the world of the list to active the activator !
- required: No (default empty list)
ifNotInWorld
- example:
ifNotInWorld:
- MyWorld
- MyOtherWorld
ifNotInWorldMsg: "&4&l[ExecutableItems] &cYou aren't in the good world to active the activator: &6%activator% &cof this item!"
- description: The player must not be in the world of the list to active the activator !
- required: No (default empty list)
ifInRegion (Require WorldGuard)
- example:
ifInRegion:
- MyRegion
- MyOtherRegion
ifInRegionMsg: "&4&l[ExecutableItems] &cYou aren't in the good region to active the activator: &6%activator% &cof this item!"
- description: The player must be in the region of the list to active the activator !
- required: No (default empty list)
ifNotInRegion (Require WorldGuard)
- example:
ifNotInRegion:
- MyRegion
- MyOtherRegion
ifNotInRegionMsg: "&4&l[ExecutableItems] &cYou are in blacklisted region to active the activator: &6%activator% &cof this item!"
- description: The player must not be in the region of the list to active the activator !
- required: No (default empty list)
ifTargetBlock
- example:
ifTargetBlock:
- DIRT
- STONE
ifTargetBlockMsg: "&4&l[ExecutableItems] &cCustom message here..."
- description: The player must face a block that the list contains to active the activator !
- required: No (default empty list)
ifNotTargetBlock
- example:
ifNotTargetBlock:
- DIRT
- STONE
ifNotTargetBlockMsg: "&4&l[ExecutableItems] &cCustom message here..."
- description: The player must not face a block that the list contains to active the activator !
- required: No (default empty list)
ifHasPermission (be carefull by default op player have all permissions, so when you test you need to deop you)
- example:
ifHasPermission:
- My.perm
- My.other.perm
ifHasPermissionMsg: "&4&l[ExecutableItems] &cYou doesn't have the permission to active the activator: &6%activator% &cof this item!"
- description: The player must have all permissions of the list to active the activator !
- required: No (default empty list)
ifNotHasPermission (be carefull by default op player have all permissions, so when you test you need to deop you)
- example:
ifNotHasPermission:
- My.perm
- My.other.perm
ifNotHasPermissionMsg: "&4&l[ExecutableItems] &cYou have blacklisted permission to active the activator: &6%activator% &cof this item!"
- description: The player must haven't all permissions of the list to active the activator !
- required: No (default empty list)
ifPlayerHealth
- example:
ifPlayerHealth: <=5
ifPlayerHealthMsg= "&4&l[ExecutableItems] &cYour health is not valid to active the activator: &6%activator% &cof this item!"
- option : <, <=, ==, >=, >
- description: The player have the valid health to active the activator ?
- required: No (default no healt condition)
ifPlayerFoodLevel
- example:
ifPlayerFoodLevel: <=5
ifPlayerFoodLevelMsg= "&4&l[ExecutableItems] &cYour food is not valid to active the activator: &6%activator% &cof this item!"
- option : <, <=, ==, >=, >
- description: The player have the valid food level to active the activator ?
- required: No (default no food level condition)
ifPlayerEXP
- example:
ifPlayerEXP: <=5
ifPlayerEXPMsg= "&4&l[ExecutableItems] &cYour EXP is not valid to active the activator: &6%activator% &cof this item!"
- option : <, <=, ==, >=, >
- description: The player have the valid EXP to active the activator ?
- required: No (default no EXP condition)
ifPlayerLevel
- example:
ifPlayerLevel: <=5
ifPlayerLevelMsg= "&4&l[ExecutableItems] &cYour level is not valid to active the activator: &6%activator% &cof this item!"
- option : <, <=, ==, >=, >
- description: The player have the valid Level to active the activator ?
- required: No (default no Level condition)
ifPosX
- example:
ifPosX: <=5
ifPosXMsg= "&4&l[ExecutableItems] &cCoordinate X is not valid to active the activator: &6%activator% &cof this item!"
- option : <, <=, ==, >=, >
- description: The player have the valid Level to active the activator ?
- required: No (default X condition)
ifPosY
- example:
ifPosY: <=5
ifPosYMsg= "&4&l[ExecutableItems] &cCoordinate Y is not valid to active the activator: &6%activator% &cof this item!"
- option : <, <=, ==, >=, >
- description: The player have the valid Level to active the activator ?
- required: No (default Y condition)
ifPosZ
- example:
ifPosZ: <=5
ifPosZMsg= "&4&l[ExecutableItems] &cCoordinate Z is not valid to active the activator: &6%activator% &cof this item!"
- option : <, <=, ==, >=, >
- description: The player have the valid Level to active the activator ?
- required: No (default Z condition)