Class NukkitSensor

java.lang.Object
com.djrapitops.plan.gathering.NukkitSensor
All Implemented Interfaces:
ServerSensor<cn.nukkit.level.Level>

@Singleton public class NukkitSensor extends Object implements ServerSensor<cn.nukkit.level.Level>
  • Constructor Details

    • NukkitSensor

      @Inject public NukkitSensor(PlanNukkit plugin)
  • Method Details

    • supportsDirectTPS

      public boolean supportsDirectTPS()
      Description copied from interface: ServerSensor
      Check if server platform provides TPS calculation.
      Specified by:
      supportsDirectTPS in interface ServerSensor<cn.nukkit.level.Level>
      Returns:
      false if the server doesn't count TPS.
    • getTPS

      public double getTPS()
      Specified by:
      getTPS in interface ServerSensor<cn.nukkit.level.Level>
    • getChunkCount

      public int getChunkCount(cn.nukkit.level.Level world)
      Specified by:
      getChunkCount in interface ServerSensor<cn.nukkit.level.Level>
    • getEntityCount

      public int getEntityCount(cn.nukkit.level.Level world)
      Specified by:
      getEntityCount in interface ServerSensor<cn.nukkit.level.Level>
    • getOnlinePlayerCount

      public int getOnlinePlayerCount()
      Specified by:
      getOnlinePlayerCount in interface ServerSensor<cn.nukkit.level.Level>
    • getWorlds

      public Iterable<cn.nukkit.level.Level> getWorlds()
      Description copied from interface: ServerSensor
      Get the worlds running on the server platform.
      Specified by:
      getWorlds in interface ServerSensor<cn.nukkit.level.Level>
      Returns:
      Empty collection if the platform doesn't support worlds.
    • getOnlinePlayerNames

      public List<String> getOnlinePlayerNames()
      Specified by:
      getOnlinePlayerNames in interface ServerSensor<cn.nukkit.level.Level>
    • getInstalledPlugins

      public List<PluginMetadata> getInstalledPlugins()
      Specified by:
      getInstalledPlugins in interface ServerSensor<cn.nukkit.level.Level>