Condition

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.

Advanced condition allows you to use more conditions with the same type in one section

simple biome condition

biome:
  - minecraft:ocean
  - minecraft:deep_ocean
  - minecraft:cold_ocean
  - minecraft:deep_cold_ocean
  - minecraft:frozen_ocean
  - minecraft:deep_frozen_ocean
  - minecraft:lukewarm_ocean
  - minecraft:deep_lukewarm_ocean
  - minecraft:warm_ocean

advanced condition (Allows you to use the same type of conditions) The section name ("requirement_biome_1" in this case) is completely customizable as long as it does not conflict with the condition type name.

requirement_biome_1:
  type: biome
  value:
    - minecraft:ocean
    - minecraft:deep_ocean
    - minecraft:cold_ocean
    - minecraft:deep_cold_ocean
    - minecraft:frozen_ocean
    - minecraft:deep_frozen_ocean
    - minecraft:lukewarm_ocean
    - minecraft:deep_lukewarm_ocean
    - minecraft:warm_ocean
requirement_biome_2:
  type: '!biome'
  value:
    - minecraft:ocean
    - minecraft:deep_ocean
    - minecraft:cold_ocean

Condition Library

time (Minecraft game time 0~23999)

time:
  - 0~1000
  - 2000~6000

advanced_requirement:
  type: time
  value:
  - 0~1000
  - 2000~6000

ypos (Player's Y coordinate)

ypos:
  - 0~43
  - -45~12
  
advanced_requirement:
  type: ypos
  value:
  - 0~43
  - -45~12

biome (Supports custom biomes)

biome:
  - minecraft:plains  <- whitelist

'!biome':
  - minecraft:plains  <- blacklist

advanced_requirement:
  type: biome
  value:
  - minecraft:plains

advanced_requirement:
  type: '!biome'
  value:
  - minecraft:plains

world

world:
  - world

'!world':
  - blacklist_world

advanced_requirement:
  type: world
  value:
  - world

advanced_requirement:
  type: '!world'
  value:
  - blacklist_world

weather

weather:
  - thunder
  - rainstorm
  - clear
  - rain

advanced_requirement:
  type: 'weather'
  value:
  - thunder
  - clear
  - rain

date (Real world date)

date:
  - 12/25
  - 6/1

advanced_requirement:
  type: 'date'
  value:
  - 12/25
  - 6/1

permission

permission: customfishing.admin

'!permission': blacklist.perm

advanced_requirement:
  type: 'permission'
  value: customfishing.admin
  
advanced_requirement:
  type: '!permission'
  value: blacklist.perm

“>” “>=” “<” “<=” “=” “!=”

'='
  value1: '20'
  value2: '%player_health%'

advanced_requirement:
  type: '='
  value:
    value1: '20'
    value2: '%player_health%'

“startsWith” “endsWith” “equals” “contains” “in-list”

'!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: true
    requirement_time:
      type: time
      value:
        - 0~12000
    '||':
      world:
        - world_nether
      '&&':
        ypos:
          - -64~-32
        world:
          - world

level (Player exp level)

level: 10

advanced_requirement:
  type: 'level'
  value: 10

random (0~1)

random: 0.3   <- 30% chance

advanced_requirement:
  type: 'random'
  value: 0.7   <- 70% chance

cooldown

cooldown:
  key: unique
  time: 1000 #ms

advanced_requirement:
  type: 'cooldown'
  value:
    key: A
    time: 100 #ms

regex

regex:
  papi: %xxx%
  regex: "[A-Z]"

advanced_requirement:
  type: 'regex'
  value:
    papi: %xxx%
    regex: "[A-Z]"

environment

environment:
  - normal
  - nether
  - the_end
  
advanced_requirement:
  type: '!environment'
  value:
    - nether
    - the_end
    - custom

potion-effect

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 amplifier

Examples:
  LUCK==1
  LUCK<5
  LUCK>=0

geyser (If the player is a geyser player)

geyser: false
  
advanced_requirement:
  type: 'geyser'
  value: true

gamemode

gamemode:
  - survival

advanced_requirement:
  type: "!gamemode"
  value:
  - adventure

self-disguised (Requires LibsDisguises)

self-disguised: false

disguised-type (Requires LibsDisguises)

'!disguised-type':
  - ARROW

Last updated