summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/Backup.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/IEssentials.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/UserMap.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java8
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmail.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java2
-rw-r--r--Essentials/test/com/earth2me/essentials/FakeServer.java27
-rw-r--r--EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java2
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java2
12 files changed, 30 insertions, 29 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Backup.java b/Essentials/src/com/earth2me/essentials/Backup.java
index baa90e561..d4f0f20ee 100644
--- a/Essentials/src/com/earth2me/essentials/Backup.java
+++ b/Essentials/src/com/earth2me/essentials/Backup.java
@@ -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
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java
index 950d250b3..31480efb7 100644
--- a/Essentials/src/com/earth2me/essentials/Essentials.java
+++ b/Essentials/src/com/earth2me/essentials/Essentials.java
@@ -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);
}
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
index 15934d9fd..6753ad9e1 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
@@ -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()
diff --git a/Essentials/src/com/earth2me/essentials/IEssentials.java b/Essentials/src/com/earth2me/essentials/IEssentials.java
index 6a2e3b638..35efd6193 100644
--- a/Essentials/src/com/earth2me/essentials/IEssentials.java
+++ b/Essentials/src/com/earth2me/essentials/IEssentials.java
@@ -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);
diff --git a/Essentials/src/com/earth2me/essentials/UserMap.java b/Essentials/src/com/earth2me/essentials/UserMap.java
index 94b504241..19cfb98e9 100644
--- a/Essentials/src/com/earth2me/essentials/UserMap.java
+++ b/Essentials/src/com/earth2me/essentials/UserMap.java
@@ -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()
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java
index d9007587f..8cbf41809 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java
@@ -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));
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java
index 76c52c8e2..a45fb1106 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java
@@ -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;
}
diff --git a/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java b/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java
index daf4df7d5..2baa680c0 100644
--- a/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java
+++ b/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java
@@ -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();
diff --git a/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java b/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java
index e8b3992ae..6a3ea836a 100644
--- a/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java
+++ b/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java
@@ -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();
diff --git a/Essentials/test/com/earth2me/essentials/FakeServer.java b/Essentials/test/com/earth2me/essentials/FakeServer.java
index 5d2ff0c88..1b57bb865 100644
--- a/Essentials/test/com/earth2me/essentials/FakeServer.java
+++ b/Essentials/test/com/earth2me/essentials/FakeServer.java
@@ -40,11 +40,13 @@ public class FakeServer implements Server
}
}
+ @Override
public String getName()
{
return "Essentials Fake Server";
}
+ @Override
public String getVersion()
{
return "1.0";
@@ -178,19 +180,6 @@ public class FakeServer implements Server
}
@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)
{
throw new UnsupportedOperationException("Not supported yet.");
@@ -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.");
+ }
};
}
diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
index 733d7212b..31324a841 100644
--- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
+++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
@@ -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()
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
index 6fdd4a6a5..a0d1ca643 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
@@ -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()