You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ricochet1k edited this page Apr 15, 2012
·
1 revision
Syntax:{entity}.has([all]items|item).{itemalias}
Description: Returns true if the referred entity is a player and has the listed items in inventory. There are two modes for this conditional statement:
has[all]items: Returns true if and only if all the Item values specified are in the player's inventory.
hasitem: Returns true if the player's inventory matches at least one of the Items in the alias.
Example:
Aliases:
Item:
oneofEachSword:
- 'IRON_SWORD'
- 'WOOD_SWORD'
- 'STONE_SWORD'
- 'GOLD_SWORD'
- 'DIAMOND_SWORD'Damage:
- 'switch.attacker': # Used so we can have exclusive branching, and only one message is shown.
- 'hasitems._oneofEachSword':
- 'message.attacker': "You've got one of every sword in Minecraft!"
- 'hasitem._oneofEachSword':
- 'message.attacker': "You've got at least one sword in your inventory!"