Plugin provides a powerful condition system. You can use both simple conditions and advanced conditions at the same time. Here are some examples for you to learn conditions.
simple biome condition only contains the necessary arguments
advanced condition allows you to use conditions of the same type and add not-met-actions
The section name ("requirement_permission_1" in this case) is completely customizable as long as it does not conflict with the condition type name.
# This example uses two permission conditionsrequirement_permission_1:type:permissionvalue: - xxx.1.xxxrequirement_permission_2:type:permissionvalue: - xxx.2.xxxnot-met-actions:action_1:type:xxxvalue:...# wrong usage (YAML format doesn't allow this)permission: - xxx.1.xxxpermission: - xxx.2.xxx
'!startWith':value1:'%player_name%'value2:'X'<- player names that are not starting with "X"advanced_requirement:type:'contains'value:value1:'%player_name%'value2:'_'<- player names that contain "_"advanced_requirement:type:'!equals'value:value1:'%player_name%'value2:'XiaoMoMi'<- player names that not equal "XiaoMoMi"advanced_requirement:type:'in-list'value:papi:'%player_name%'values: - 'XiaoMoMi' - 'XIAOMOMI' - 'XlA0M0Ml'
logic (Create complex conditions)
advanced_requirement:type:'&&'value:in-lava:truerequirement_time:type:timevalue: - 0~12000'||':world: - world_nether'&&':ypos: - -64~-32world: - world
potion-effect:"LUCK>=0"advanced_requirement:type:'potion-effect'value:"LUCK!=-1""-1":Player doesn't have such a potion effect"value no lower than 0":The potion effect's amplifierExamples:LUCK==1LUCK<5LUCK>=0
condition_xxx:type:water-more-thanvalue:0ondition_xxx:type:water-more-thanvalue:y:-1# y defaults to -1 if not setvalue:0
water less than (For custom pots)
condition_xxx:type:water-less-thanvalue:1condition_xxx:type:water-less-thanvalue:y:-1# y defaults to -1 if not setvalue:1
point more than
condition_xxx:type:point-more-thanvalue:1
point less than
condition_xxx:type:point-less-thanvalue:1
moisture more than (For vanilla farmland)
condition_xxx:type:moisture-more-thanvalue:0condition_xxx:type:moisture-more-thanvalue:y:-1# y defaults to -1 if not setvalue:0
moisture less than (For vanilla farmland)
condition_xxx:type:moisture-less-thanvalue:1condition_xxx:type:moisture-less-thanvalue:y:-1# y defaults to -1 if not setvalue:1
pot
condition_xxx:type:potvalue:y:-1id: - default
fertilizer
condition_xxx:type:fertilizervalue: - speed_grow_1# has no fertilizercondition_xxx:type:fertilizervalue:y:-1# Y defaults to 0has:false# blacklist idscondition_xxx:type:fertilizervalue:y:-1has:falsetype: - speed_grow_1 - soil_retain_2# whitelist idscondition_xxx:type:fertilizervalue:y:0has:truetype: - speed_grow_1 - speed_grow_2 - speed_grow_3
fertilizer type
condition_xxx:type:fertilizer-typevalue: - SPEED_GROW# has no fertilizercondition_xxx:type:fertilizervalue:y:-1# Y defaults to 0has:false# blacklist typescondition_xxx:type:fertilizervalue:y:-1has:falsetype: - speed_grow - soil_retain# whitelist typescondition_xxx:type:fertilizervalue:y:0has:truetype: - speed_grow
region (requires WorldGuard)
advanced_requirement:type:regionvalue:mode:1# 1,2values: - a - bregion:mode:2values: - a - b