-
Notifications
You must be signed in to change notification settings - Fork 1
Condition commands
Condition commands should be used with the /cu execute if ...
command.
/cu is before <timestamp>
/cu is after <timestamp>
Returns SUCCESS
if it is before or respectively after the specified timestamp
. The timestamp must be in this format:
HH:mm:ss.SSS-dd.MM.yyyy
00:36:25.300-19.05.2018
Tip: You may want to use PlaceholderAPI for its JavaScript capabilities to generate a timestamp automatically, see this example.
/cu has money <playerName>|<playerUuid> <money>
Returns SUCCESS
if the player has as much money as specified or more.
/cu has payed <playerName>|<playerUuid> <money>
Returns SUCCESS
if withdrawing the specified amount of money from the player's economy account was successful.
/cu has in hand <playerName>|<playerUuid> <item> [quantity = 1]
Returns SUCCESS
if the player has the specified item in the main hand. Read this to learn more how you can specify an item.
If no quantity is given, it defaults to 1. If you set a higher quantity, the player must have at least that amount in the hand.
/cu has given from hand <playerName>|<playerUuid> <item> [quantity = 1]
It is the same as /cu has in hand ...
but also removes the specified item from the player's hand. This is useful for 'shop sell' commands. Read this to learn more how you can specify an item.
If no quantity is given, it defaults to 1. If you set a higher quantity, the player must have at least that amount in the hand.
/cu has in inventory <playerName>|<playerUuid> <item> [quantity = 1]
Returns SUCCESS
if the player has the specified item in the inventory. Read this to learn more how you can specify an item.
If no quantity is given, it defaults to 1. If you set a higher quantity, the player must have at least that amount in the inventory.
/cu has given from inventory <playerName>|<playerUuid> <item> [quantity = 1]
It is the same as /cu has in inventory ...
but also removes the specified item from the player's inventory. Read this to learn more how you can specify an item.
If no quantity is given, it defaults to 1. If you set a higher quantity, the player must have at least that amount in the inventory.
/cu has permission <playerName>|<playerUuid> <permission>
Returns SUCCESS
if the player has the specified permission.
/cu has chance <chance>
Returns the outcome of the random chance generator. The chance
must be between 0.0
and 1.0
. 0.8
means 80%
.