Interface Source


@AvailableSince("1.0.0") public interface Source
Represents the sender/source of a command being executed may be a console, a player in a game, etc...
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final UUID
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> T
    as(Class<T> clazz)
     
    void
    error(String message)
    Replies to the command sender with a string message formatted specifically for error messages
    boolean
     
     
     
    void
    reply(String message)
    Replies to the command sender with a string message
    default UUID
     
    void
    warn(String message)
    Replies to the command sender with a string message formatted specifically for error messages
  • Field Details

    • CONSOLE_UUID

      static final UUID CONSOLE_UUID
  • Method Details

    • name

      String name()
      Returns:
      name of a command source
    • origin

      Object origin()
      Returns:
      The original command sender valueType instance
    • reply

      void reply(String message)
      Replies to the command sender with a string message
      Parameters:
      message - the message
    • warn

      void warn(String message)
      Replies to the command sender with a string message formatted specifically for error messages
      Parameters:
      message - the message
    • error

      void error(String message)
      Replies to the command sender with a string message formatted specifically for error messages
      Parameters:
      message - the message
    • isConsole

      boolean isConsole()
      Returns:
      Whether the command source is from the console
    • uuid

      default UUID uuid()
      Returns:
      returns the UUID of the command source
    • as

      default <T> T as(Class<T> clazz)