1
0
mirror of https://e.coding.net/circlecloud/Residence.git synced 2024-10-31 22:38:48 +00:00

change to Task Async...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-10-07 18:04:54 +08:00
parent 5e041d528a
commit 83105d2934

View File

@ -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)) {