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
,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()
-
-
-
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 interfacejava.lang.Runnable
-
register
public void register(net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory)
- Specified by:
register
in classTaskSystem.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()
-
-