@Singleton public class SpongeSensor extends java.lang.Object implements ServerSensor<org.spongepowered.api.world.World>
Constructor and Description |
---|
SpongeSensor(PlanSponge plugin) |
Modifier and Type | Method and Description |
---|---|
int |
getChunkCount(org.spongepowered.api.world.World world) |
int |
getEntityCount(org.spongepowered.api.world.World world) |
int |
getOnlinePlayerCount() |
double |
getTPS() |
java.lang.Iterable<org.spongepowered.api.world.World> |
getWorlds()
Get the worlds running on the server platform.
|
boolean |
supportsDirectTPS()
Check if server platform provides TPS calculation.
|
@Inject public SpongeSensor(PlanSponge plugin)
public boolean supportsDirectTPS()
ServerSensor
supportsDirectTPS
in interface ServerSensor<org.spongepowered.api.world.World>
public int getOnlinePlayerCount()
getOnlinePlayerCount
in interface ServerSensor<org.spongepowered.api.world.World>
public double getTPS()
getTPS
in interface ServerSensor<org.spongepowered.api.world.World>
public java.lang.Iterable<org.spongepowered.api.world.World> getWorlds()
ServerSensor
getWorlds
in interface ServerSensor<org.spongepowered.api.world.World>
public int getChunkCount(org.spongepowered.api.world.World world)
getChunkCount
in interface ServerSensor<org.spongepowered.api.world.World>
public int getEntityCount(org.spongepowered.api.world.World world)
getEntityCount
in interface ServerSensor<org.spongepowered.api.world.World>