From 83105d2934f4937b8ed9fe31a126d6e730ff9dd8 Mon Sep 17 00:00:00 2001 From: j502647092 Date: Wed, 7 Oct 2015 18:04:54 +0800 Subject: [PATCH] change to Task Async... Signed-off-by: j502647092 --- .../java/com/bekvon/bukkit/residence/ResidenceMain.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/bekvon/bukkit/residence/ResidenceMain.java b/src/main/java/com/bekvon/bukkit/residence/ResidenceMain.java index a96301e..55d300d 100644 --- a/src/main/java/com/bekvon/bukkit/residence/ResidenceMain.java +++ b/src/main/java/com/bekvon/bukkit/residence/ResidenceMain.java @@ -88,8 +88,7 @@ public class ResidenceMain extends JavaPlugin { public static float bukkitver; public final static int saveVersion = 1; - public final static String[] validLanguages = { "English", - "Chinese" }; + public final static String[] validLanguages = { "English", "Chinese" }; public final static Pattern VER_REGEX = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)"); protected static ResidenceMain instance; protected DataBackup backup; @@ -505,17 +504,17 @@ public class ResidenceMain extends JavaPlugin { int autosaveInt = cmanager.getAutoSaveInterval(); autosaveInt = autosaveInt < 1 ? 1 : autosaveInt * 60 * 20; - taskmanager.add(this.getServer().getScheduler().runTaskTimer(this, new AutoSaveTask(this), autosaveInt, autosaveInt)); + taskmanager.add(this.getServer().getScheduler().runTaskTimerAsynchronously(this, new AutoSaveTask(this), autosaveInt, autosaveInt)); if (cmanager.useLeases()) { int leaseInterval = cmanager.getLeaseCheckInterval(); leaseInterval = leaseInterval < 1 ? 1 : leaseInterval * 60 * 20; - taskmanager.add(this.getServer().getScheduler().runTaskTimer(this, new LeaseTask(this), leaseInterval, leaseInterval)); + taskmanager.add(this.getServer().getScheduler().runTaskTimerAsynchronously(this, new LeaseTask(this), leaseInterval, leaseInterval)); } if (cmanager.enabledRentSystem()) { int rentint = cmanager.getRentCheckInterval(); rentint = rentint < 1 ? 1 : rentint * 60 * 20; - taskmanager.add(this.getServer().getScheduler().runTaskTimer(this, new RentTask(this), rentint, rentint)); + taskmanager.add(this.getServer().getScheduler().runTaskTimerAsynchronously(this, new RentTask(this), rentint, rentint)); } for (final Player player : Bukkit.getServer().getOnlinePlayers()) { if (this.getPermissionManager().isResidenceAdmin(player)) {