public interface SenderResolver<A extends CommandActor>
Registering a custom sender resolver allows using certain types as
senders. The custom types must be tested inside isSenderType(CommandParameter),
and it is recommended to use CustomType.class.isAssignableFrom(type) to
make sure subclasses are respected.
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.lang.Object |
getSender(@NotNull java.lang.Class<?> customSenderType,
A actor,
@NotNull ExecutableCommand<A> command)
Returns the custom sender value from the given context
|
boolean |
isSenderType(@NotNull CommandParameter parameter)
Tests whether is the specified type a custom sender type or not
|
boolean isSenderType(@NotNull
@NotNull CommandParameter parameter)
parameter - Type to test@NotNull
@NotNull java.lang.Object getSender(@NotNull
@NotNull java.lang.Class<?> customSenderType,
@NotNull
A actor,
@NotNull
@NotNull ExecutableCommand<A> command)
customSenderType - The type of the custom sender. This matches
the command parameter type.actor - The command actorcommand - The command being executed