Refactor name of ScheduleAsyncDelayedTask to RunTaskAsynchronously

This commit is contained in:
Iaccidentally 2013-01-31 14:16:09 -05:00
parent cd126264e0
commit 4edc39360a
12 changed files with 30 additions and 29 deletions

View File

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

View File

@ -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);
}

View File

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

View File

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

View File

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

View File

@ -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));
}
}
}

View File

@ -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;
}

View File

@ -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();

View File

@ -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();

View File

@ -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.");
}
};
}

View File

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

View File

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