Package com.djrapitops.plan.gathering
Class BukkitSensor
java.lang.Object
com.djrapitops.plan.gathering.BukkitSensor
- All Implemented Interfaces:
ServerSensor<org.bukkit.World>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getChunkCount
(org.bukkit.World world) int
getEntityCount
(org.bukkit.World world) int
double
getTPS()
Iterable<org.bukkit.World>
Get the worlds running on the server platform.static boolean
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
-
BukkitSensor
@Inject public BukkitSensor(org.bukkit.Server server)
-
-
Method Details
-
isPaperAvailable
public static boolean isPaperAvailable() -
supportsDirectTPS
public boolean supportsDirectTPS()Description copied from interface:ServerSensor
Check if server platform provides TPS calculation.- Specified by:
supportsDirectTPS
in interfaceServerSensor<org.bukkit.World>
- Returns:
- false if the server doesn't count TPS.
-
getTPS
public double getTPS()- Specified by:
getTPS
in interfaceServerSensor<org.bukkit.World>
-
getChunkCount
public int getChunkCount(org.bukkit.World world) - Specified by:
getChunkCount
in interfaceServerSensor<org.bukkit.World>
-
getEntityCount
public int getEntityCount(org.bukkit.World world) - Specified by:
getEntityCount
in interfaceServerSensor<org.bukkit.World>
-
getOnlinePlayerCount
public int getOnlinePlayerCount()- Specified by:
getOnlinePlayerCount
in interfaceServerSensor<org.bukkit.World>
-
getWorlds
Description copied from interface:ServerSensor
Get the worlds running on the server platform.- Specified by:
getWorlds
in interfaceServerSensor<org.bukkit.World>
- Returns:
- Empty collection if the platform doesn't support worlds.
-
getOnlinePlayerNames
- Specified by:
getOnlinePlayerNames
in interfaceServerSensor<org.bukkit.World>
-