requires

public final Unit requires(CommandCondition predicate)

Adds a requirement to the command syntax. If a requirement already exists, the new requirement will be combined with the existing one using a logical AND.

Parameters

predicate

The condition that must be met for the command to be executed.