Class FabricSensor
java.lang.Object
net.playeranalytics.plan.gathering.FabricSensor
- All Implemented Interfaces:
ServerSensor<net.minecraft.server.world.ServerWorld>
@Singleton
public class FabricSensor
extends Object
implements ServerSensor<net.minecraft.server.world.ServerWorld>
-
Constructor Summary
ConstructorDescriptionFabricSensor
(net.minecraft.server.dedicated.MinecraftDedicatedServer server) -
Method Summary
Modifier and TypeMethodDescriptionint
getChunkCount
(net.minecraft.server.world.ServerWorld world) int
getEntityCount
(net.minecraft.server.world.ServerWorld world) int
double
getTPS()
Iterable<net.minecraft.server.world.ServerWorld>
Get the worlds running on the server platform.boolean
Check if server platform provides TPS calculation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.djrapitops.plan.gathering.ServerSensor
usingRedisBungee
-
Constructor Details
-
FabricSensor
@Inject public FabricSensor(net.minecraft.server.dedicated.MinecraftDedicatedServer server)
-
-
Method Details
-
getTPS
public double getTPS()- Specified by:
getTPS
in interfaceServerSensor<net.minecraft.server.world.ServerWorld>
-
getWorlds
Description copied from interface:ServerSensor
Get the worlds running on the server platform.- Specified by:
getWorlds
in interfaceServerSensor<net.minecraft.server.world.ServerWorld>
- Returns:
- Empty collection if the platform doesn't support worlds.
-
getEntityCount
public int getEntityCount(net.minecraft.server.world.ServerWorld world) - Specified by:
getEntityCount
in interfaceServerSensor<net.minecraft.server.world.ServerWorld>
-
getChunkCount
public int getChunkCount(net.minecraft.server.world.ServerWorld world) - Specified by:
getChunkCount
in interfaceServerSensor<net.minecraft.server.world.ServerWorld>
-
supportsDirectTPS
public boolean supportsDirectTPS()Description copied from interface:ServerSensor
Check if server platform provides TPS calculation.- Specified by:
supportsDirectTPS
in interfaceServerSensor<net.minecraft.server.world.ServerWorld>
- Returns:
- false if the server doesn't count TPS.
-
getOnlinePlayerCount
public int getOnlinePlayerCount()- Specified by:
getOnlinePlayerCount
in interfaceServerSensor<net.minecraft.server.world.ServerWorld>
-
getOnlinePlayerNames
- Specified by:
getOnlinePlayerNames
in interfaceServerSensor<net.minecraft.server.world.ServerWorld>
-