mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01:00
Refactor name of ScheduleAsyncDelayedTask to RunTaskAsynchronously
This commit is contained in:
parent
cd126264e0
commit
4edc39360a
@ -72,7 +72,7 @@ public class Backup implements Runnable
|
||||
server.dispatchCommand(cs, "save-all");
|
||||
server.dispatchCommand(cs, "save-off");
|
||||
|
||||
ess.scheduleAsyncDelayedTask(
|
||||
ess.runTaskAsynchronously(
|
||||
new Runnable()
|
||||
{
|
||||
@Override
|
||||
|
@ -225,7 +225,7 @@ public class Essentials extends JavaPlugin implements IEssentials
|
||||
final MetricsStarter metricsStarter = new MetricsStarter(this);
|
||||
if (metricsStarter.getStart() != null && metricsStarter.getStart() == true)
|
||||
{
|
||||
getScheduler().scheduleAsyncDelayedTask(this, metricsStarter, 1);
|
||||
getScheduler().runTaskLaterAsynchronously(this, metricsStarter, 1);
|
||||
}
|
||||
else if (metricsStarter.getStart() != null && metricsStarter.getStart() == false)
|
||||
{
|
||||
@ -609,7 +609,7 @@ public class Essentials extends JavaPlugin implements IEssentials
|
||||
}
|
||||
|
||||
@Override
|
||||
public BukkitTask scheduleAsyncDelayedTask(final Runnable run)
|
||||
public BukkitTask runTaskAsynchronously(final Runnable run)
|
||||
{
|
||||
return this.getScheduler().runTaskAsynchronously(this, run);
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ public class EssentialsPlayerListener implements Listener
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onPlayerJoin(final PlayerJoinEvent event)
|
||||
{
|
||||
ess.scheduleAsyncDelayedTask(new Runnable()
|
||||
ess.runTaskAsynchronously(new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
|
@ -45,7 +45,7 @@ public interface IEssentials extends Plugin
|
||||
|
||||
Methods getPaymentMethod();
|
||||
|
||||
BukkitTask scheduleAsyncDelayedTask(Runnable run);
|
||||
BukkitTask runTaskAsynchronously(Runnable run);
|
||||
|
||||
BukkitTask runTaskLaterAsynchronously(Runnable run, long delay);
|
||||
|
||||
|
@ -27,7 +27,7 @@ public class UserMap extends CacheLoader<String, User> implements IConf
|
||||
|
||||
private void loadAllUsersAsync(final IEssentials ess)
|
||||
{
|
||||
ess.scheduleAsyncDelayedTask(new Runnable()
|
||||
ess.runTaskAsynchronously(new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
|
@ -63,7 +63,7 @@ public class Commandbalancetop extends EssentialsCommand
|
||||
{
|
||||
lock.readLock().unlock();
|
||||
}
|
||||
ess.scheduleAsyncDelayedTask(new Viewer(sender, page, force));
|
||||
ess.runTaskAsynchronously(new Viewer(sender, page, force));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -71,7 +71,7 @@ public class Commandbalancetop extends EssentialsCommand
|
||||
{
|
||||
sender.sendMessage(_("orderBalances", ess.getUserMap().getUniqueUsers()));
|
||||
}
|
||||
ess.scheduleAsyncDelayedTask(new Viewer(sender, page, force));
|
||||
ess.runTaskAsynchronously(new Viewer(sender, page, force));
|
||||
}
|
||||
|
||||
}
|
||||
@ -144,7 +144,7 @@ public class Commandbalancetop extends EssentialsCommand
|
||||
{
|
||||
lock.writeLock().unlock();
|
||||
}
|
||||
ess.scheduleAsyncDelayedTask(viewer);
|
||||
ess.runTaskAsynchronously(viewer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -178,7 +178,7 @@ public class Commandbalancetop extends EssentialsCommand
|
||||
{
|
||||
lock.readLock().unlock();
|
||||
}
|
||||
ess.scheduleAsyncDelayedTask(new Calculator(new Viewer(sender, page, force), force));
|
||||
ess.runTaskAsynchronously(new Calculator(new Viewer(sender, page, force), force));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ public class Commandmail extends EssentialsCommand
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.mail.sendall"));
|
||||
}
|
||||
ess.scheduleAsyncDelayedTask(new SendAll(user.getName() + ": " + Util.stripFormat(getFinalArg(args, 1))));
|
||||
ess.runTaskAsynchronously(new SendAll(user.getName() + ": " + Util.stripFormat(getFinalArg(args, 1))));
|
||||
user.sendMessage(_("mailSent"));
|
||||
return;
|
||||
}
|
||||
@ -114,7 +114,7 @@ public class Commandmail extends EssentialsCommand
|
||||
}
|
||||
else if (args.length >= 1 && "sendall".equalsIgnoreCase(args[0]))
|
||||
{
|
||||
ess.scheduleAsyncDelayedTask(new SendAll("Server: " + getFinalArg(args, 2)));
|
||||
ess.runTaskAsynchronously(new SendAll("Server: " + getFinalArg(args, 2)));
|
||||
sender.sendMessage(_("mailSent"));
|
||||
return;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public abstract class AbstractDelayedYamlFileReader<T extends StorageObject> imp
|
||||
this.file = file;
|
||||
this.clazz = clazz;
|
||||
this.plugin = ess;
|
||||
ess.scheduleAsyncDelayedTask(this);
|
||||
ess.runTaskAsynchronously(this);
|
||||
}
|
||||
|
||||
public abstract void onStart();
|
||||
|
@ -15,7 +15,7 @@ public abstract class AbstractDelayedYamlFileWriter implements Runnable
|
||||
public AbstractDelayedYamlFileWriter(IEssentials ess, File file)
|
||||
{
|
||||
this.file = file;
|
||||
ess.scheduleAsyncDelayedTask(this);
|
||||
ess.runTaskAsynchronously(this);
|
||||
}
|
||||
|
||||
public abstract StorageObject getObject();
|
||||
|
@ -40,11 +40,13 @@ public class FakeServer implements Server
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return "Essentials Fake Server";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion()
|
||||
{
|
||||
return "1.0";
|
||||
@ -177,19 +179,6 @@ public class FakeServer implements Server
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scheduleAsyncDelayedTask(Plugin plugin, Runnable r, long l)
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scheduleAsyncDelayedTask(Plugin plugin, Runnable r)
|
||||
{
|
||||
r.run();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scheduleAsyncRepeatingTask(Plugin plugin, Runnable r, long l, long l1)
|
||||
{
|
||||
@ -279,6 +268,18 @@ public class FakeServer implements Server
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scheduleAsyncDelayedTask(Plugin plugin, Runnable r, long l)
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scheduleAsyncDelayedTask(Plugin plugin, Runnable r)
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ public class EssentialsGeoIPPlayerListener implements Listener, IConf
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onPlayerJoin(final PlayerJoinEvent event)
|
||||
{
|
||||
ess.scheduleAsyncDelayedTask(new Runnable()
|
||||
ess.runTaskAsynchronously(new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
|
@ -72,7 +72,7 @@ public class EssentialsSpawnPlayerListener implements Listener
|
||||
|
||||
public void onPlayerJoin(final PlayerJoinEvent event)
|
||||
{
|
||||
ess.scheduleAsyncDelayedTask(new Runnable()
|
||||
ess.runTaskAsynchronously(new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
|
Loading…
Reference in New Issue
Block a user