Interface CommandSource

All Known Subinterfaces:
GeyserConnection

public interface CommandSource
Represents an instance capable of sending commands.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    hasPermission(String permission)
    Checks if this command source has the given permission
    boolean
    If this source is the console.
    Returns the locale of the command source.
    The name of the command source.
    void
    sendMessage(@NonNull String message)
    Sends the given message to the command source
    default void
    sendMessage(String[] messages)
    Sends the given messages to the command source
  • Method Details

    • name

      String name()
      The name of the command source.
      Returns:
      the name of the command source
    • sendMessage

      void sendMessage(@NonNull String message)
      Sends the given message to the command source
      Parameters:
      message - the message to send
    • sendMessage

      default void sendMessage(String[] messages)
      Sends the given messages to the command source
      Parameters:
      messages - the messages to send
    • isConsole

      boolean isConsole()
      If this source is the console.
      Returns:
      true if this source is the console
    • locale

      String locale()
      Returns the locale of the command source.
      Returns:
      the locale of the command source.
    • hasPermission

      boolean hasPermission(String permission)
      Checks if this command source has the given permission
      Parameters:
      permission - The permission node to check
      Returns:
      true if this command source has a permission