Class NukkitPingCounter

java.lang.Object
net.playeranalytics.plugin.scheduling.PluginRunnable
com.djrapitops.plan.TaskSystem.Task
com.djrapitops.plan.gathering.timed.NukkitPingCounter
All Implemented Interfaces:
cn.nukkit.event.Listener, 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, PlanConfig config, DBSystem dbSystem, ServerInfo serverInfo, net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addPlayer​(cn.nukkit.Player player)
     
    void
     
    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 Details

    • NukkitPingCounter

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

    • run

      public void run()
      Specified by:
      run in interface 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()