Make the backwards compatible scheduler available to all.
Dieser Commit ist enthalten in:
Ursprung
845f339a30
Commit
f416d1ba3d
@ -51,6 +51,8 @@ import org.bukkit.configuration.InvalidConfigurationException;
|
|||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.PluginDescriptionFile;
|
import org.bukkit.plugin.PluginDescriptionFile;
|
||||||
|
|
||||||
|
import com.comphenix.protocol.utility.WrappedScheduler;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -136,7 +138,7 @@ public class Metrics {
|
|||||||
/**
|
/**
|
||||||
* The scheduled task
|
* The scheduled task
|
||||||
*/
|
*/
|
||||||
private volatile Scheduling.TaskWrapper task = null;
|
private volatile WrappedScheduler.TaskWrapper task = null;
|
||||||
|
|
||||||
public Metrics(final Plugin plugin) throws IOException {
|
public Metrics(final Plugin plugin) throws IOException {
|
||||||
if (plugin == null) {
|
if (plugin == null) {
|
||||||
@ -237,7 +239,7 @@ public class Metrics {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Begin hitting the server with glorious data
|
// Begin hitting the server with glorious data
|
||||||
task = Scheduling.runAsynchronously(plugin, new Runnable() {
|
task = WrappedScheduler.runAsynchronously(plugin, new Runnable() {
|
||||||
|
|
||||||
private boolean firstPost = true;
|
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.plugin.Plugin;
|
||||||
import org.bukkit.scheduler.BukkitScheduler;
|
import org.bukkit.scheduler.BukkitScheduler;
|
||||||
@ -9,7 +9,7 @@ import org.bukkit.scheduler.BukkitTask;
|
|||||||
*
|
*
|
||||||
* @author Kristian
|
* @author Kristian
|
||||||
*/
|
*/
|
||||||
class Scheduling {
|
public class WrappedScheduler {
|
||||||
/**
|
/**
|
||||||
* Represents a backwards compatible Bukkit task.
|
* Represents a backwards compatible Bukkit task.
|
||||||
*/
|
*/
|
In neuem Issue referenzieren
Einen Benutzer sperren