mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-12-24 18:18:12 +01:00
Make the backwards compatible scheduler available to all.
This commit is contained in:
parent
845f339a30
commit
f416d1ba3d
@ -51,6 +51,8 @@ import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
|
||||
import com.comphenix.protocol.utility.WrappedScheduler;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -136,7 +138,7 @@ public class Metrics {
|
||||
/**
|
||||
* The scheduled task
|
||||
*/
|
||||
private volatile Scheduling.TaskWrapper task = null;
|
||||
private volatile WrappedScheduler.TaskWrapper task = null;
|
||||
|
||||
public Metrics(final Plugin plugin) throws IOException {
|
||||
if (plugin == null) {
|
||||
@ -237,7 +239,7 @@ public class Metrics {
|
||||
}
|
||||
|
||||
// Begin hitting the server with glorious data
|
||||
task = Scheduling.runAsynchronously(plugin, new Runnable() {
|
||||
task = WrappedScheduler.runAsynchronously(plugin, new Runnable() {
|
||||
|
||||
private boolean firstPost = true;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.comphenix.protocol.metrics;
|
||||
package com.comphenix.protocol.utility;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
@ -9,7 +9,7 @@ import org.bukkit.scheduler.BukkitTask;
|
||||
*
|
||||
* @author Kristian
|
||||
*/
|
||||
class Scheduling {
|
||||
public class WrappedScheduler {
|
||||
/**
|
||||
* Represents a backwards compatible Bukkit task.
|
||||
*/
|
Loading…
Reference in New Issue
Block a user