From 07e98ab79f58767eb41537ac4c0ece0e539bf3d6 Mon Sep 17 00:00:00 2001 From: gmcferrin Date: Tue, 25 Dec 2012 01:06:21 -0500 Subject: [PATCH] Fixed Async deprecation issues --- Changelog.txt | 1 + .../com/gmail/nossr50/commands/general/MmoupdateCommand.java | 2 +- src/main/java/com/gmail/nossr50/util/Metrics.java | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index f88d1fd9a..6563da290 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -13,6 +13,7 @@ Version 1.3.13-dev = Fixed issue with Mining using actual skill level rather than max skill level = Fixed some issues with static access = Fixed ItemStack deprecation issues + = Fixed Async deprecation issues ! GJ stopped being a lazy slacker and got stuff done - Removed dead code relating to null profiles - Removed unused imports diff --git a/src/main/java/com/gmail/nossr50/commands/general/MmoupdateCommand.java b/src/main/java/com/gmail/nossr50/commands/general/MmoupdateCommand.java index 737dacd58..b58ce63df 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/MmoupdateCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/general/MmoupdateCommand.java @@ -46,6 +46,6 @@ public class MmoupdateCommand implements CommandExecutor { return; } - plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new SQLConversionTask(plugin), 1); + plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new SQLConversionTask(plugin), 1); } } diff --git a/src/main/java/com/gmail/nossr50/util/Metrics.java b/src/main/java/com/gmail/nossr50/util/Metrics.java index b0fdea93d..9f66a1d32 100644 --- a/src/main/java/com/gmail/nossr50/util/Metrics.java +++ b/src/main/java/com/gmail/nossr50/util/Metrics.java @@ -221,7 +221,7 @@ public class Metrics { } // Begin hitting the server with glorious data - taskId = plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable() { + taskId = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, new Runnable() { private boolean firstPost = true; @@ -249,7 +249,7 @@ public class Metrics { Bukkit.getLogger().log(Level.INFO, "[Metrics] " + e.getMessage()); } } - }, 0, PING_INTERVAL * 1200); + }, 0, PING_INTERVAL * 1200).getTaskId(); return true; }