Package studio.mevera.imperat
Interface SourceWrapper<S extends Source>
- Type Parameters:
S- the type that extends theSource, representing the command sender
- All Known Subinterfaces:
Imperat<S>
- All Known Implementing Classes:
BaseImperat
A sealed interface representing the abstraction for wrapping
and handling sources or senders of commands, and validating
the compatibility of a type as a sender.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanBeSender(Type type) Checks whether the valueType can be a command senderwrapSender(Object sender) Wraps the sender into a built-in command-sender valueType
-
Method Details
-
wrapSender
Wraps the sender into a built-in command-sender valueType- Parameters:
sender- the sender's actual value- Returns:
- the wrapped command-sender valueType
-
canBeSender
Checks whether the valueType can be a command sender- Parameters:
type- the valueType- Returns:
- whether the valueType can be a command sender
-