Package com.djrapitops.plan.gathering
Class NukkitSensor
- java.lang.Object
-
- com.djrapitops.plan.gathering.NukkitSensor
-
- All Implemented Interfaces:
ServerSensor<cn.nukkit.level.Level>
@Singleton public class NukkitSensor extends java.lang.Object implements ServerSensor<cn.nukkit.level.Level>
-
-
Constructor Summary
Constructors Constructor Description NukkitSensor(PlanNukkit plugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
NukkitSensor
@Inject public NukkitSensor(PlanNukkit plugin)
-
-
Method Detail
-
supportsDirectTPS
public boolean supportsDirectTPS()
Description copied from interface:ServerSensor
Check if server platform provides TPS calculation.- Specified by:
supportsDirectTPS
in interfaceServerSensor<cn.nukkit.level.Level>
- Returns:
- false if the server doesn't count TPS.
-
getTPS
public double getTPS()
- Specified by:
getTPS
in interfaceServerSensor<cn.nukkit.level.Level>
-
getChunkCount
public int getChunkCount(cn.nukkit.level.Level world)
- Specified by:
getChunkCount
in interfaceServerSensor<cn.nukkit.level.Level>
-
getEntityCount
public int getEntityCount(cn.nukkit.level.Level world)
- Specified by:
getEntityCount
in interfaceServerSensor<cn.nukkit.level.Level>
-
getOnlinePlayerCount
public int getOnlinePlayerCount()
- Specified by:
getOnlinePlayerCount
in interfaceServerSensor<cn.nukkit.level.Level>
-
getWorlds
public java.lang.Iterable<cn.nukkit.level.Level> getWorlds()
Description copied from interface:ServerSensor
Get the worlds running on the server platform.- Specified by:
getWorlds
in interfaceServerSensor<cn.nukkit.level.Level>
- Returns:
- Empty collection if the platform doesn't support worlds.
-
-