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 Details

    • getProjectName

      String getProjectName()
      Gets the name of the project (plugin, mod, ...) reporting metrics.

      This name is submitted along with the metrics so the service can associate the data with the correct project.

      Returns:
      the project name
    • 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