From f52004cb763e935601413ce01ee616f79e9e2c59 Mon Sep 17 00:00:00 2001 From: Eric Stokes Date: Sat, 12 Mar 2016 15:10:27 -0700 Subject: [PATCH] Removed deprecated use of scheduleAsyncDelayedTask --- .../MultiverseCore/commands/VersionCommand.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java index 37a6bf97..f529c159 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java @@ -155,7 +155,7 @@ public class VersionCommand extends MultiverseCommand { Logging.info(line); } - this.plugin.getServer().getScheduler().scheduleAsyncDelayedTask(this.plugin, new Runnable() { + BukkitRunnable logPoster = new BukkitRunnable() { @Override public void run() { if (args.size() == 1) { @@ -177,7 +177,10 @@ public class VersionCommand extends MultiverseCommand { Logging.info("Version info dumped here: %s", pasteUrl); } } - }); + }; + + // Run the log posting operation asynchronously, since we don't know how long it will take. + logPoster.runTaskAsynchronously(this.plugin); } /**