Interface Platform

All Known Implementing Classes:
BukkitPlatform, BungeePlatform, HytalePlatform, MinestomPlatform, NukkitPlatform, SpongePlatform, VelocityPlatform

public interface Platform
Represents the platform environment (e.g. Bukkit, BungeeCord, Velocity, standard JVM) in which the FastStats library is running.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the platform-specific configuration.
    Gets default platform-specific metrics.
    default void
    logError(String message, Throwable throwable)
    Logs error messages.
    default void
    logInfo(String message)
    Logs informational messages.
    default void
    logWarning(String message)
    Logs warning messages.
  • Method Details

    • getConfig

      Config getConfig()
      Retrieves the platform-specific configuration.
      Returns:
      the platform config instance
    • getMetrics

      Collection<Metric<?>> getMetrics()
      Gets default platform-specific metrics.
      Returns:
      a collection of platform metrics
    • logInfo

      default void logInfo(String message)
      Logs informational messages.
      Parameters:
      message - the message to log
    • logWarning

      default void logWarning(String message)
      Logs warning messages.
      Parameters:
      message - the message to log
    • logError

      default void logError(String message, Throwable throwable)
      Logs error messages.
      Parameters:
      message - the error message
      throwable - the cause of the error