Interface SourceWrapper<S extends Source>

Type Parameters:
S - the type that extends the Source, representing the command sender
All Known Subinterfaces:
Imperat<S>
All Known Implementing Classes:
BaseImperat

public sealed interface SourceWrapper<S extends Source> permits Imperat<S>
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 Type
    Method
    Description
    boolean
    Checks whether the valueType can be a command sender
    Wraps the sender into a built-in command-sender valueType
  • Method Details

    • wrapSender

      S wrapSender(Object sender)
      Wraps the sender into a built-in command-sender valueType
      Parameters:
      sender - the sender's actual value
      Returns:
      the wrapped command-sender valueType
    • canBeSender

      boolean canBeSender(Type type)
      Checks whether the valueType can be a command sender
      Parameters:
      type - the valueType
      Returns:
      whether the valueType can be a command sender