Package de.oliver.fancyanalytics.api
Klasse FancyAnalyticsAPI
java.lang.Object
de.oliver.fancyanalytics.api.FancyAnalyticsAPI
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungFancyAnalyticsAPI(@NotNull String projectId, @NotNull String apiToken) Initializes a new instance of the FancyAnalyticsAPI. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungGets the GlobalExceptionHandler instance associated with this FancyAnalyticsAPI.voidvoidregisterAsMinecraftServer(org.bukkit.plugin.Plugin plugin) Do not use this method, it is for internal use onlyvoidregisterMinecraftPluginMetrics(org.bukkit.plugin.Plugin plugin) Registers the default metrics related to the provided plugin.voidregisterNumberMetric(MetricSupplier<Double> metric) Registers a numerical metric using the provided MetricSupplier.voidregisterStringMetric(MetricSupplier<String> metric) Registers a string metric using the provided MetricSupplier.voidreportError(Throwable throwable) Reports an error by sending it to the configured analytics server.voidSends an event to the analytics server.
-
Felddetails
-
LOGGER
-
-
Konstruktordetails
-
FancyAnalyticsAPI
Initializes a new instance of the FancyAnalyticsAPI.- Parameter:
projectId- can be found in the project settings page: https://fancyanalytics.net/projects/apiToken- can be found in the project settings page: https://fancyanalytics.net/projects/
-
-
Methodendetails
-
initialize
public void initialize() -
reportError
Reports an error by sending it to the configured analytics server.- Parameter:
throwable- The Throwable object representing the error to be reported.
-
sendEvent
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
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
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
Gets the GlobalExceptionHandler instance associated with this FancyAnalyticsAPI.- Gibt zurück:
- the current instance of GlobalExceptionHandler.
-
getConfig
-