Klasse FancyAnalyticsAPI

java.lang.Object
de.oliver.fancyanalytics.api.FancyAnalyticsAPI

public class FancyAnalyticsAPI extends Object
  • Felddetails

    • LOGGER

      public static final Logger LOGGER
  • Konstruktordetails

  • Methodendetails

    • initialize

      public void initialize()
    • reportError

      public void reportError(Throwable throwable)
      Reports an error by sending it to the configured analytics server.
      Parameter:
      throwable - The Throwable object representing the error to be reported.
    • sendEvent

      public void sendEvent(Event event)
      Sends an event to the analytics server.
      Parameter:
      event - The Event object containing the name and properties of the event to be sent.
    • registerMinecraftPluginMetrics

      public void registerMinecraftPluginMetrics(org.bukkit.plugin.Plugin plugin)
      Registers the default metrics related to the provided plugin.
      Parameter:
      plugin - the Plugin instance for which to register the default metrics
    • registerAsMinecraftServer

      @Internal public void registerAsMinecraftServer(org.bukkit.plugin.Plugin plugin)
      Do not use this method, it is for internal use only
    • registerNumberMetric

      public void registerNumberMetric(MetricSupplier<Double> metric)
      Registers a numerical metric using the provided MetricSupplier. The metric will be stored and managed by the FancyAnalyticsAPI instance.
      Parameter:
      metric - the MetricSupplier containing the name and value supplier of the numeric metric to be registered
      Löst aus:
      IllegalArgumentException - if a metric with the same name already exists
    • registerStringMetric

      public void registerStringMetric(MetricSupplier<String> metric)
      Registers a string metric using the provided MetricSupplier. The metric will be stored and managed by the FancyAnalyticsAPI instance.
      Parameter:
      metric - the MetricSupplier containing the name and value supplier of the string metric to be registered
      Löst aus:
      IllegalArgumentException - if a metric with the same name already exists
    • getExceptionHandler

      public GlobalExceptionHandler getExceptionHandler()
      Gets the GlobalExceptionHandler instance associated with this FancyAnalyticsAPI.
      Gibt zurück:
      the current instance of GlobalExceptionHandler.