Class NukkitPingCounter

  • All Implemented Interfaces:
    cn.nukkit.event.Listener, java.lang.Runnable

    @Singleton
    public class NukkitPingCounter
    extends TaskSystem.Task
    implements cn.nukkit.event.Listener
    Task that handles player ping calculation on Nukkit 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
      NukkitPingCounter​(net.playeranalytics.plugin.server.Listeners listeners, PlanNukkit plugin, 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​(cn.nukkit.Player player)  
      void clear()  
      void onPlayerJoin​(cn.nukkit.event.player.PlayerJoinEvent joinEvent)  
      void onPlayerQuit​(cn.nukkit.event.player.PlayerQuitEvent quitEvent)  
      void register​(net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory)  
      void removePlayer​(cn.nukkit.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

      • NukkitPingCounter

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

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • register

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

        public void addPlayer​(cn.nukkit.Player player)
      • removePlayer

        public void removePlayer​(cn.nukkit.Player player)
      • onPlayerJoin

        public void onPlayerJoin​(cn.nukkit.event.player.PlayerJoinEvent joinEvent)
      • onPlayerQuit

        public void onPlayerQuit​(cn.nukkit.event.player.PlayerQuitEvent quitEvent)
      • clear

        public void clear()