Class SpongeSensor

java.lang.Object
com.djrapitops.plan.gathering.SpongeSensor
All Implemented Interfaces:
ServerSensor<org.spongepowered.api.world.server.ServerWorld>

@Singleton public class SpongeSensor extends Object implements ServerSensor<org.spongepowered.api.world.server.ServerWorld>
  • Constructor Details

    • SpongeSensor

      @Inject public SpongeSensor(org.spongepowered.api.Game game)
  • Method Details

    • supportsDirectTPS

      public boolean supportsDirectTPS()
      Description copied from interface: ServerSensor
      Check if server platform provides TPS calculation.
      Specified by:
      supportsDirectTPS in interface ServerSensor<org.spongepowered.api.world.server.ServerWorld>
      Returns:
      false if the server doesn't count TPS.
    • getOnlinePlayerCount

      public int getOnlinePlayerCount()
      Specified by:
      getOnlinePlayerCount in interface ServerSensor<org.spongepowered.api.world.server.ServerWorld>
    • getTPS

      public double getTPS()
      Specified by:
      getTPS in interface ServerSensor<org.spongepowered.api.world.server.ServerWorld>
    • getWorlds

      public Iterable<org.spongepowered.api.world.server.ServerWorld> getWorlds()
      Description copied from interface: ServerSensor
      Get the worlds running on the server platform.
      Specified by:
      getWorlds in interface ServerSensor<org.spongepowered.api.world.server.ServerWorld>
      Returns:
      Empty collection if the platform doesn't support worlds.
    • getChunkCount

      public int getChunkCount(org.spongepowered.api.world.server.ServerWorld world)
      Specified by:
      getChunkCount in interface ServerSensor<org.spongepowered.api.world.server.ServerWorld>
    • getEntityCount

      public int getEntityCount(org.spongepowered.api.world.server.ServerWorld world)
      Specified by:
      getEntityCount in interface ServerSensor<org.spongepowered.api.world.server.ServerWorld>