mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-03 11:06:08 +00:00
Update to 1.4.7 R1 :: remove calls to ScheduleAsyncDelayedTask, as it is deprecated :: cleanup :: WARNING: This commit may or may not be stable
This commit is contained in:
parent
3d4d616414
commit
cd126264e0
7 changed files with 27 additions and 9 deletions
|
@ -63,6 +63,7 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
|||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.yaml.snakeyaml.error.YAMLException;
|
||||
|
||||
|
||||
|
@ -608,9 +609,14 @@ public class Essentials extends JavaPlugin implements IEssentials
|
|||
}
|
||||
|
||||
@Override
|
||||
public int scheduleAsyncDelayedTask(final Runnable run)
|
||||
public BukkitTask scheduleAsyncDelayedTask(final Runnable run)
|
||||
{
|
||||
return this.getScheduler().scheduleAsyncDelayedTask(this, run);
|
||||
return this.getScheduler().runTaskAsynchronously(this, run);
|
||||
}
|
||||
@Override
|
||||
public BukkitTask runTaskLaterAsynchronously(final Runnable run, final long delay)
|
||||
{
|
||||
return this.getScheduler().runTaskLaterAsynchronously(this, run, delay);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.bukkit.command.Command;
|
|||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
|
||||
public interface IEssentials extends Plugin
|
||||
|
@ -44,7 +45,9 @@ public interface IEssentials extends Plugin
|
|||
|
||||
Methods getPaymentMethod();
|
||||
|
||||
int scheduleAsyncDelayedTask(Runnable run);
|
||||
BukkitTask scheduleAsyncDelayedTask(Runnable run);
|
||||
|
||||
BukkitTask runTaskLaterAsynchronously(Runnable run, long delay);
|
||||
|
||||
int scheduleSyncDelayedTask(Runnable run);
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import org.bukkit.Server;
|
|||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
|
||||
public class Commandheal extends EssentialsCommand
|
||||
|
|
|
@ -33,7 +33,7 @@ public class MetricsListener implements Listener
|
|||
player.sendMessage("To opt out, run /essentials opt-out");
|
||||
ess.getLogger().log(Level.INFO, "[Metrics] Admin join - Starting 5 minute opt-out period.");
|
||||
ess.getSettings().setMetricsEnabled(true);
|
||||
ess.getScheduler().scheduleAsyncDelayedTask(ess, starter, 5 * 1200);
|
||||
ess.getScheduler().runTaskLaterAsynchronously(ess, starter, 5 * 1200);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue