Interface GeyserLogger

All Superinterfaces:
org.geysermc.geyser.api.command.CommandSource, GeyserCommandSource

public interface GeyserLogger extends GeyserCommandSource
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    debug(@Nullable Object object)
    Logs an object to console if debug mode is enabled
    void
    debug(String message)
    Logs a debug message to console
    void
    debug(String message, Object... arguments)
    Logs and formats a message to console if debug mode is enabled, with the provided arguments.
    default void
    debug(GeyserSession session, String message, Object... arguments)
    A method to debug information specific to a session.
    void
    error(String message)
    Logs an error message to console
    void
    error(String message, Throwable error)
    Logs an error message and an exception to console
    default boolean
    hasPermission(String permission)
     
    void
    info(String message)
    Logs an info message to console
    default void
    info(net.kyori.adventure.text.Component message)
    Logs an info component to console
    default boolean
     
    boolean
    If debug is enabled for this logger
    default String
     
    default @Nullable UUID
     
    default void
    sendMessage(@NonNull String message)
     
    void
    setDebug(boolean debug)
    Sets if the logger should print debug messages
    void
    severe(String message)
    Logs a severe message to console
    void
    severe(String message, Throwable error)
    Logs a severe message and an exception to console
    void
    warning(String message)
    Logs a warning message to console

    Methods inherited from interface org.geysermc.geyser.api.command.CommandSource

    sendMessage

    Methods inherited from interface org.geysermc.geyser.command.GeyserCommandSource

    connection, handle, locale, sendLocaleString, sendLocaleString, sendMessage
  • Method Details

    • severe

      void severe(String message)
      Logs a severe message to console
      Parameters:
      message - the message to log
    • severe

      void severe(String message, Throwable error)
      Logs a severe message and an exception to console
      Parameters:
      message - the message to log
      error - the error to throw
    • error

      void error(String message)
      Logs an error message to console
      Parameters:
      message - the message to log
    • error

      void error(String message, Throwable error)
      Logs an error message and an exception to console
      Parameters:
      message - the message to log
      error - the error to throw
    • warning

      void warning(String message)
      Logs a warning message to console
      Parameters:
      message - the message to log
    • info

      void info(String message)
      Logs an info message to console
      Parameters:
      message - the message to log
    • info

      default void info(net.kyori.adventure.text.Component message)
      Logs an info component to console
      Parameters:
      message - the message to log
    • debug

      void debug(String message)
      Logs a debug message to console
      Parameters:
      message - the message to log
    • debug

      default void debug(@Nullable Object object)
      Logs an object to console if debug mode is enabled
      Parameters:
      object - the object to log
    • debug

      void debug(String message, Object... arguments)
      Logs and formats a message to console if debug mode is enabled, with the provided arguments.
      Parameters:
      message - the message to log
      arguments - the arguments to replace in the message
    • setDebug

      void setDebug(boolean debug)
      Sets if the logger should print debug messages
      Parameters:
      debug - if the logger should print debug messages
    • debug

      default void debug(GeyserSession session, String message, Object... arguments)
      A method to debug information specific to a session.
    • isDebug

      boolean isDebug()
      If debug is enabled for this logger
    • name

      default String name()
      Specified by:
      name in interface org.geysermc.geyser.api.command.CommandSource
    • sendMessage

      default void sendMessage(@NonNull String message)
      Specified by:
      sendMessage in interface org.geysermc.geyser.api.command.CommandSource
    • isConsole

      default boolean isConsole()
      Specified by:
      isConsole in interface org.geysermc.geyser.api.command.CommandSource
    • playerUuid

      default @Nullable UUID playerUuid()
      Specified by:
      playerUuid in interface org.geysermc.geyser.api.command.CommandSource
    • hasPermission

      default boolean hasPermission(String permission)
      Specified by:
      hasPermission in interface org.geysermc.geyser.api.command.CommandSource