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.
Note: In certain contexts, 'condition' and 'requirement' can be used interchangeably; it just depends on the situation. For instance, we might say the 'condition' for a piece of loot to appear, but when talking about the prerequisites for using a fishing rod, we'd say 'requirement'.
You must be wondering why there are two ways of writing conditions. This is because some conditions require feedback for unsatisfied situations. For instance, if you want to add a permission node to a fishing rod and notify the player when they can't use it, a simple condition alone cannot meet the requirements of the configuration file.
Here's the rod example
star_fishing_rod:material:fishing_rodrequirements:requirement_1:type:permissionvalue:star_fishing_rod.usenot-met-actions:<- optional sectionaction_1:type:messagevalue:'You cannot use this rod!'<- feedback
advanced_requirement:type:regionvalue:position:other# other/player (in most cases `other`=hook's position)mode:1# 1,2values: - a - bregion:position:othermode:2values: - a - b
'!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'
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