From 0ed76d7228fa50e5a55b798e3a9646317f73c3d7 Mon Sep 17 00:00:00 2001 From: Dan Mulloy Date: Thu, 9 Apr 2015 20:42:54 -0400 Subject: [PATCH] Use our scheduler with metrics --- .../main/java/com/comphenix/protocol/metrics/Metrics.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Metrics.java b/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Metrics.java index d029369e..296b8780 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Metrics.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/metrics/Metrics.java @@ -52,9 +52,9 @@ import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginDescriptionFile; -import org.bukkit.scheduler.BukkitTask; import com.comphenix.protocol.utility.Util; +import com.comphenix.protocol.utility.WrappedScheduler; public class Metrics { @@ -116,7 +116,7 @@ public class Metrics { /** * The scheduled task */ - private volatile BukkitTask task = null; + private volatile WrappedScheduler.TaskWrapper task = null; public Metrics(final Plugin plugin) throws IOException { if (plugin == null) { @@ -200,7 +200,7 @@ public class Metrics { } // Begin hitting the server with glorious data - task = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, new Runnable() { + task = WrappedScheduler.runAsynchronouslyRepeat(plugin, new Runnable() { private boolean firstPost = true;