Class BukkitSensor

java.lang.Object
com.djrapitops.plan.gathering.BukkitSensor
All Implemented Interfaces:
ServerSensor<org.bukkit.World>

@Singleton public class BukkitSensor extends Object implements ServerSensor<org.bukkit.World>
  • 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 interface ServerSensor<org.bukkit.World>
      Returns:
      false if the server doesn't count TPS.
    • getTPS

      public double getTPS()
      Specified by:
      getTPS in interface ServerSensor<org.bukkit.World>
    • getChunkCount

      public int getChunkCount(org.bukkit.World world)
      Specified by:
      getChunkCount in interface ServerSensor<org.bukkit.World>
    • getEntityCount

      public int getEntityCount(org.bukkit.World world)
      Specified by:
      getEntityCount in interface ServerSensor<org.bukkit.World>
    • getOnlinePlayerCount

      public int getOnlinePlayerCount()
      Specified by:
      getOnlinePlayerCount in interface ServerSensor<org.bukkit.World>
    • getWorlds

      public Iterable<org.bukkit.World> getWorlds()
      Description copied from interface: ServerSensor
      Get the worlds running on the server platform.
      Specified by:
      getWorlds in interface ServerSensor<org.bukkit.World>
      Returns:
      Empty collection if the platform doesn't support worlds.
    • getOnlinePlayerNames

      public List<String> getOnlinePlayerNames()
      Specified by:
      getOnlinePlayerNames in interface ServerSensor<org.bukkit.World>
    • getInstalledPlugins

      public List<PluginMetadata> getInstalledPlugins()
      Specified by:
      getInstalledPlugins in interface ServerSensor<org.bukkit.World>