Class BukkitPingCounter

java.lang.Object
net.playeranalytics.plugin.scheduling.PluginRunnable
com.djrapitops.plan.TaskSystem.Task
com.djrapitops.plan.gathering.timed.BukkitPingCounter
All Implemented Interfaces:
Runnable, org.bukkit.event.Listener

@Singleton public class BukkitPingCounter extends TaskSystem.Task implements org.bukkit.event.Listener
Task that handles player ping calculation on Bukkit based servers.

Modified PingManager from LagMonitor plugin. https://github.com/games647/LagMonitor/blob/master/src/main/java/com/github/games647/lagmonitor/task/PingManager.java

  • Constructor Summary

    Constructors
    Constructor
    Description
    BukkitPingCounter​(net.playeranalytics.plugin.server.Listeners listeners, PlanConfig config, DBSystem dbSystem, ServerInfo serverInfo, net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addPlayer​(org.bukkit.entity.Player player)
     
    void
     
    void
    onPlayerJoin​(org.bukkit.event.player.PlayerJoinEvent joinEvent)
     
    void
    onPlayerQuit​(org.bukkit.event.player.PlayerQuitEvent quitEvent)
     
    void
    register​(net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory)
     
    void
    removePlayer​(org.bukkit.entity.Player player)
     
    void
    run()
     

    Methods inherited from class net.playeranalytics.plugin.scheduling.PluginRunnable

    cancel

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BukkitPingCounter

      @Inject public BukkitPingCounter(net.playeranalytics.plugin.server.Listeners listeners, PlanConfig config, DBSystem dbSystem, ServerInfo serverInfo, net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory)
  • Method Details

    • register

      public void register(net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory)
      Specified by:
      register in class TaskSystem.Task
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • addPlayer

      public void addPlayer(org.bukkit.entity.Player player)
    • removePlayer

      public void removePlayer(org.bukkit.entity.Player player)
    • onPlayerJoin

      public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent joinEvent)
    • onPlayerQuit

      public void onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent quitEvent)
    • clear

      public void clear()