square-codeConditions

Conditions allow you to evaluate a situation, displaying/retrieving text depending on whether the condition value is “true” or “false.”

Conditions are identified by ??

Generally, conditions require dependency on PlaceholderAPIarrow-up-right.

Conditions

Text Conditions

Name
Description
Tag
Example

IF

Checks if a boolean condition is true

?IF: value?

?IF: %player_flying%? Player is flying

IF_NOT

Checks if a boolean condition is false

?IF_NOT: value?

?IF_NOT: %player_flying%? Player is not flying

PERMISSION

Checks if a player has a specific permission

?PERMISSION: permission?

?PERMISSION: admin.access? You are an admin

NO_PERMISSION

Checks if a player does not have a specific permission

?NO_PERMISSION: permission?

?NO_PERMISSION: vip.access? You are not VIP

EQUALS

Checks if two strings are equal

?EQUALS: value1 = value2?

?EQUALS: %player_name% = Steve? Your name is Steve

NOT_EQUALS

Checks if two strings are not equal

?NOT_EQUALS: value1 != value2?

?NOT_EQUALS: %player_gamemode% != CREATIVE? You are not in creative mode

Usage

Conditions can be used in text to show or hide content based on certain criteria. The format is:

?CONDITION_TYPE: value? Text to display if condition is true

Multiple conditions can be chained together, and all conditions must be met for the text to be displayed.

Atualizado