Class BukkitPingCounter

  • All Implemented Interfaces:
    java.lang.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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPlayer​(org.bukkit.entity.Player player)  
      void clear()  
      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 Detail

      • BukkitPingCounter

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

      • 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 java.lang.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()