BaseConstraint
in package
Table of Contents
- $context : IRunnable
- __construct() : mixed
- BaseConstraint constructor.
- getContext() : IRunnable
- isVisibleTo() : bool
- onFailure() : void
- test() : bool
Properties
$context
protected
IRunnable
$context
Methods
__construct()
BaseConstraint constructor.
public
__construct(IRunnable $context) : mixed
"Context" is required so that this new-constraint-system doesn't hinder getting command info
Parameters
- $context : IRunnable
Return values
mixed —getContext()
public
getContext() : IRunnable
Return values
IRunnable —isVisibleTo()
public
abstract isVisibleTo(CommandSender $sender) : bool
Parameters
- $sender : CommandSender
Return values
bool —onFailure()
public
abstract onFailure(CommandSender $sender, string $aliasUsed, array<string|int, mixed> $args) : void
Parameters
- $sender : CommandSender
- $aliasUsed : string
- $args : array<string|int, mixed>
Return values
void —test()
public
abstract test(CommandSender $sender, string $aliasUsed, array<string|int, mixed> $args) : bool
Parameters
- $sender : CommandSender
- $aliasUsed : string
- $args : array<string|int, mixed>