Conditional Components

With this components you can add conditions to your command list.

[BUY]

This is usefull if you want to make a shop easily using this component.

How it works?

The following example illustrates how the [buy] component operates when positioned after the [message] Before component. Firstly, the message component will be executed, followed by the [buy] component. The [buy] component will verify if the player has a balance of 100 money; if yes, the component will remove the 100 from the player balance, and the remaining components will be executed. However, if the player's balance is insufficient, the "buy_failed" message will be displayed.

Example [buy]
click_commands:
  - "[message] Before"
  - "[buy(money)] 100"
  - "[console] give %pl_player% diamond"
  - "[message] &aSuccess!"

Syntax:

[BUY(currency)] <amount>

Currencies:

MONEY

This will check if the player has the right money in thier balance, then the amount will be removed.

[BUY(money)] 100

From Vault

TOKENS

This will check if the player has the right amount of tokens in thier balance, then the amount will be removed.

[BUY(tokens)] 100

From FlareTokens

MOBCOINS

This will check if the player has the right amount of mobcoins in thier balance, then the amount will be removed.

[BUY(mobcoins)] 100

From FlareMobcoins

Last updated