Class Metrics

java.lang.Object
cn.nukkit.metrics.Metrics

@Since("1.4.0.0-PN") public class Metrics extends Object
bStats collects some data for plugin authors.

Check out https://bStats.org/ to learn more about bStats!

  • Field Details

  • Constructor Details

    • Metrics

      @Since("1.4.0.0-PN") public Metrics(String name, String serverUUID, boolean logFailedRequests, MainLogger logger)
      Creates a new instance and starts submitting immediately.
      Parameters:
      name - The bStats metrics identifier.
      serverUUID - The unique identifier of this server.
      logFailedRequests - If failed submissions should be logged.
      logger - The server main logger, ignored by PowerNukkit.
    • Metrics

      @PowerNukkitOnly @Since("1.4.0.0-PN") public Metrics(String name, String serverUUID, boolean logFailedRequests)
      Creates a new instance and starts submitting immediately.
      Parameters:
      name - The bStats metrics identifier.
      serverUUID - The unique identifier of this server.
      logFailedRequests - If failed submissions should be logged.
  • Method Details

    • addCustomChart

      @Since("1.4.0.0-PN") public void addCustomChart(Metrics.CustomChart chart)
      Adds a custom chart.
      Parameters:
      chart - The chart to add.
    • close

      public void close()