- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
CommandSenderis allowed to run the command or a specific syntax.
canUseCalled when the sender permission needs to be checked.
The first time will be during player connection in order to know if the command/syntax should be displayed as tab-completion suggestion,
commandStringwill be null in this case. (It is also possible for the command string to be null if a new command packet is built)
commandStringwill never be null but will instead be the raw command string given by the sender. You should in this case warn the sender (eg by sending a message) if the condition is unsuccessful.
sender- the sender of the command
commandString- the raw command string, null if this is an access request
- true if the sender has the right to use the command, false otherwise