RequirementAction v3 - RealMegaMinds/ActionInventoryMod GitHub Wiki

Requirement Action

Requirement actions execute other actions based on if the player clicking matches the requirements.

They look like:

{
  ...common fields...
  "entitySelector": "",
  "entityPredicate": {},
  "opLevel": 0
}

(common fields are specified in Actions v3)

Entity Selector (defaults to no requirement)

This is the entity selector that the player is matched against. This is a string.
See here for information about entity selectors. "@s" is stuck on the front of what you provide; so, for example, "entitySelector": "[name=Bob]" would go to "entitySelector": "@s[name=Bob]". You can also use this for creating selectors. Just remove the @whatever from the front.

Entity Predicate (default matches all) Added: 3.1

This is an entity predicate that a player must match. This is an object or array.
See here for general info on predicates. You can also go here for creating them.

Op Level (default 0) Added: 3.7.0

This is the minimum op level a player must have. This is an integer.

Note

Players must match both the selector and the predicate.

⚠️ **GitHub.com Fallback** ⚠️