Flectone Logo FlectonePulse

Condition

The condition tag is used to display text based on a specific condition

Usage: <condition:name>

condition


🌍 Localization

Path localizations → language.yml → message.format.condition
condition:
  values:
    player_name:
      default: "Nameless"
      notch: "Markus Persson"
      thefaser: "Artyom Mochalin"
    player_ping:
      "0": "Excellent"
      "50": "Good"
      "100": "Decent"
      "150": "Bad"
      "300": "Terrible"
    is_admin:
      "true": "Admin"
      "false": "Player"
condition:
  values:
    player_name:
      default: "Безымянный"
      notch: "Маркус Перссон"
      thefaser: "Артём Мочалин"
    player_ping:
      "0": "Отлично"
      "50": "Хорошо"
      "100": "Неплохо"
      "150": "Плохо"
      "300": "Ужасно"
    is_admin:
      "true": "Админ"
      "false": "Игрок"

values

A list of all conditions, where the key is the name and the value is the parameters with their localization

All parameters must be specified in lowercase, for example, if player_name is TheFaser, you need to specify thefaser

In all conditions, you can use the default field, which will be used if other values are not found. This can be thought of as the else in an if construct

If the condition is a NUMBER, then the values are specified in ranges. For example, the condition is %player_ping% and values are defined for 0, 50, 100, and the player's ping is 69, then the localization from 50 will be used


⚙️ Setting

Path message.yml → format.condition
condition:
  enable: true
  values:
    player_name:
      value: "%player_name%"
      type: "STRING"
    player_ping:
      value: "%player_ping%"
      type: "NUMBER"
    is_admin:
      value: "minecraft.admin"
      type: "PERMISSION"

enable

Enables or disables the functionality of the module

values

A list of all conditions with settings, where the key is the name

value

The text that will be checked for value. This is a string and can be anything like "%player_name% %player_world%" or "1234"

type

The type of condition

TypeExplanation
STRINGA string that will be formatted and its value will be checked
NUMBERA number that will be formatted and parsed, its value is checked within a range
PERMISSIONA permission that is checked for existence

🔐 Permissions

Path permission.yml → message.format.condition
condition:
  name: "flectonepulse.module.message.format.condition"
  type: "TRUE"
  values:
    player_name:
      name: "flectonepulse.module.message.format.condition.player_name"
      type: "TRUE"
    player_ping:
      name: "flectonepulse.module.message.format.condition.player_ping"
      type: "TRUE"
    is_admin:
      name: "flectonepulse.module.message.format.condition.is_admin"
      type: "TRUE"

name

Permission name

type

Permission type

TypeExplanation
TRUEAvailable to any player
FALSEAvailable to no one, must be granted separately (e.g., using LuckPerms)
OPAvailable to server operators
NOT_OPAvailable to NON-operators of the server

values

A list of all conditions with their individual display permissions

Last updated on

Edit on GitHub

On this page

Authors of page