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