Package com.djrapitops.plan.gathering
Class BukkitSensor
java.lang.Object
com.djrapitops.plan.gathering.BukkitSensor
- All Implemented Interfaces:
ServerSensor<org.bukkit.World>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetChunkCount(org.bukkit.World world) intgetEntityCount(org.bukkit.World world) Optional<long[]> getMspt()Milliseconds per tick stored in the MinecraftServer class.intdoublegetTPS()Iterable<org.bukkit.World> Get the worlds running on the server platform.booleanstatic booleanbooleanbooleanCheck if server platform provides TPS calculation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.djrapitops.plan.gathering.ServerSensor
usingRedisBungee
-
Constructor Details
-
BukkitSensor
@Inject public BukkitSensor(org.bukkit.Server server)
-
-
Method Details
-
isPaperAvailable
public static boolean isPaperAvailable() -
supportsDirectTPS
public boolean supportsDirectTPS()Description copied from interface:ServerSensorCheck if server platform provides TPS calculation.- Specified by:
supportsDirectTPSin interfaceServerSensor<org.bukkit.World>- Returns:
- false if the server doesn't count TPS.
-
getTPS
public double getTPS()- Specified by:
getTPSin interfaceServerSensor<org.bukkit.World>
-
getChunkCount
public int getChunkCount(org.bukkit.World world) - Specified by:
getChunkCountin interfaceServerSensor<org.bukkit.World>
-
getEntityCount
public int getEntityCount(org.bukkit.World world) - Specified by:
getEntityCountin interfaceServerSensor<org.bukkit.World>
-
getOnlinePlayerCount
public int getOnlinePlayerCount()- Specified by:
getOnlinePlayerCountin interfaceServerSensor<org.bukkit.World>
-
getWorlds
Description copied from interface:ServerSensorGet the worlds running on the server platform.- Specified by:
getWorldsin interfaceServerSensor<org.bukkit.World>- Returns:
- Empty collection if the platform doesn't support worlds.
-
getOnlinePlayerNames
- Specified by:
getOnlinePlayerNamesin interfaceServerSensor<org.bukkit.World>
-
getInstalledPlugins
- Specified by:
getInstalledPluginsin interfaceServerSensor<org.bukkit.World>
-
supportsBans
public boolean supportsBans()- Specified by:
supportsBansin interfaceServerSensor<org.bukkit.World>
-
isBanned
- Specified by:
isBannedin interfaceServerSensor<org.bukkit.World>
-
getMspt
Description copied from interface:ServerSensorMilliseconds per tick stored in the MinecraftServer class.Contains 0 values that are initialized on server boot, which should be ignored.
- Specified by:
getMsptin interfaceServerSensor<org.bukkit.World>- Returns:
- Optional empty if not supported on the platform.
-