Condition Tutorial

What is Condition

Condition is used to filter what entry needs to be shown on the tablist. You can put your condition inside condition field. Example:

example:
    type: WORLD_LIST
    text: '{world_name}'
    condition: "'{world_name}' == 'Survival' || '{world_name}' == 'Creative'"

Condition is evaluated using JavaScript engine, this means you can use javascript functions to handle your condition. Example:

example:
    type: WORLD_LIST
    text: '{world_name}'
    condition: "'Creative,Lobby'.includes('{world_name}') || '{world_name}'.startsWith('Survival')"

AND

Used to compare 2 statement, which requires all of the statements to be true Operator: && Example Usage: true && false or '{player_world}' == 'Survival' && '{player_gamemode}' == 'SURVIVAL'

Value 1

Value 2

Result

true

true

accepted/true

false

false

rejected/false

true

false

rejected/false

false

true

rejected/false

OR

Used to compare 2 statement, which requires only one of the statements to be true/ac Operator: || Example Usage: true || false or '{player_world}' == 'world' || '{player_world}' == 'world_nether' || '{player_world}' == 'world_the_end'

Value 1

Value 2

Result

true

true

accepted/true

false

false

rejected/false

true

false

accepted/true

false

true

accepted/true

You can compare more than 2 statement. Example: statement1 || statement2 && statement3

NEGATING STATEMENT

Used to negate statement, false to true, true to false. Operator: ! Example Usage: !true

Value

Result

true

false

false

true

Last updated