Package com.djrapitops.plan.gathering
Interface ServerSensor<W>
- Type Parameters:
W- Type of the class representing a minecraft world.
- All Known Implementing Classes:
BukkitSensor,BungeeSensor,FabricSensor,NukkitSensor,SpongeSensor,VelocitySensor
public interface ServerSensor<W>
Allows sensing values from different server platforms.
-
Method Summary
Modifier and TypeMethodDescriptiondefault intgetChunkCount(W world) default intgetEntityCount(W world) default List<PluginMetadata> default Optional<long[]> getMspt()Milliseconds per tick stored in the MinecraftServer class.intdefault doublegetTPS()Get the worlds running on the server platform.default booleandefault booleanbooleanCheck if server platform provides TPS calculation.default boolean
-
Method Details
-
supportsDirectTPS
boolean supportsDirectTPS()Check if server platform provides TPS calculation.- Returns:
- false if the server doesn't count TPS.
-
getOnlinePlayerCount
int getOnlinePlayerCount() -
getTPS
default double getTPS() -
getWorlds
Get the worlds running on the server platform.- Returns:
- Empty collection if the platform doesn't support worlds.
-
getChunkCount
-
getEntityCount
-
getOnlinePlayerNames
-
usingRedisBungee
default boolean usingRedisBungee() -
getInstalledPlugins
-
supportsBans
default boolean supportsBans() -
isBanned
-
getMspt
Milliseconds per tick stored in the MinecraftServer class.Contains 0 values that are initialized on server boot, which should be ignored.
- Returns:
- Optional empty if not supported on the platform.
-