1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-09-25 13:49:12 +02:00

Update pom.xml for 1.4.7 R1 :: Replace deprecated scheduleAsyncDelayedTask

This commit is contained in:
Iaccidentally
2013-01-31 19:12:04 -05:00
parent d8657b3e00
commit 5f480a5da5
15 changed files with 23 additions and 23 deletions

View File

@@ -23,7 +23,7 @@ public interface IPlugin extends Plugin
* @param run - Code to call later * @param run - Code to call later
* @return - BukkitTask for the task created * @return - BukkitTask for the task created
*/ */
BukkitTask scheduleAsyncDelayedTask(final Runnable run); BukkitTask runTaskAsynchronously(final Runnable run);
/** /**
* Schedule a sync task (ran in main thread) to be run * Schedule a sync task (ran in main thread) to be run
@@ -40,7 +40,7 @@ public interface IPlugin extends Plugin
* @param delay - Long that represents how long to wait * @param delay - Long that represents how long to wait
* @return - BukkitTask for the task created * @return - BukkitTask for the task created
*/ */
BukkitTask scheduleAsyncDelayedTask(final Runnable run, final long delay); BukkitTask runTaskLaterAsynchronously(final Runnable run, final long delay);
/** /**
* Schedule a sync (ran in main thread) delayed task * Schedule a sync (ran in main thread) delayed task

View File

@@ -76,7 +76,7 @@ public class Backup implements Runnable, IBackup
} }
} }
ess.getPlugin().scheduleAsyncDelayedTask(new BackupRunner(backupCommand)); ess.getPlugin().runTaskAsynchronously(new BackupRunner(backupCommand));
} }

View File

@@ -133,7 +133,7 @@ public class BukkitPlugin extends JavaPlugin implements IPlugin
} }
@Override @Override
public BukkitTask scheduleAsyncDelayedTask(final Runnable run) public BukkitTask runTaskAsynchronously(final Runnable run)
{ {
return getServer().getScheduler().runTaskAsynchronously(this, run); return getServer().getScheduler().runTaskAsynchronously(this, run);
} }
@@ -145,7 +145,7 @@ public class BukkitPlugin extends JavaPlugin implements IPlugin
} }
@Override @Override
public BukkitTask scheduleAsyncDelayedTask(final Runnable run, final long delay) public BukkitTask runTaskLaterAsynchronously(final Runnable run, final long delay)
{ {
return getServer().getScheduler().runTaskLaterAsynchronously(this, run, delay); return getServer().getScheduler().runTaskLaterAsynchronously(this, run, delay);
} }

View File

@@ -84,7 +84,7 @@ public class Commandbalancetop extends EssentialsCommand
{ {
lock.readLock().unlock(); lock.readLock().unlock();
} }
ess.getPlugin().scheduleAsyncDelayedTask(new Viewer(sender, page, force)); ess.getPlugin().runTaskAsynchronously(new Viewer(sender, page, force));
} }
else else
{ {
@@ -92,7 +92,7 @@ public class Commandbalancetop extends EssentialsCommand
{ {
sender.sendMessage(_("orderBalances", ess.getUserMap().getUniqueUsers())); sender.sendMessage(_("orderBalances", ess.getUserMap().getUniqueUsers()));
} }
ess.getPlugin().scheduleAsyncDelayedTask(new Viewer(sender, page, force)); ess.getPlugin().runTaskAsynchronously(new Viewer(sender, page, force));
} }
} }
@@ -169,7 +169,7 @@ public class Commandbalancetop extends EssentialsCommand
{ {
lock.writeLock().unlock(); lock.writeLock().unlock();
} }
ess.getPlugin().scheduleAsyncDelayedTask(viewer); ess.getPlugin().runTaskAsynchronously(viewer);
} }
} }
@@ -203,7 +203,7 @@ public class Commandbalancetop extends EssentialsCommand
{ {
lock.readLock().unlock(); lock.readLock().unlock();
} }
ess.getPlugin().scheduleAsyncDelayedTask(new Calculator(new Viewer(sender, page, force), force)); ess.getPlugin().runTaskAsynchronously(new Calculator(new Viewer(sender, page, force), force));
} }
} }
} }

View File

@@ -56,7 +56,7 @@ public class Commandmail extends EssentialsCommand
{ {
throw new Exception(_("noPerm", "essentials.mail.sendall")); throw new Exception(_("noPerm", "essentials.mail.sendall"));
} }
ess.getPlugin().scheduleAsyncDelayedTask(new SendAll(user.getName() + ": " + FormatUtil.stripColor(getFinalArg(args, 1)))); ess.getPlugin().runTaskAsynchronously(new SendAll(user.getName() + ": " + FormatUtil.stripColor(getFinalArg(args, 1))));
user.sendMessage(_("mailSent")); user.sendMessage(_("mailSent"));
return; return;
} }
@@ -90,7 +90,7 @@ public class Commandmail extends EssentialsCommand
} }
else if (args.length >= 1 && "sendall".equalsIgnoreCase(args[0])) else if (args.length >= 1 && "sendall".equalsIgnoreCase(args[0]))
{ {
ess.getPlugin().scheduleAsyncDelayedTask(new SendAll("Server: " + getFinalArg(args, 2))); ess.getPlugin().runTaskAsynchronously(new SendAll("Server: " + getFinalArg(args, 2)));
} }
else if (args.length >= 2) else if (args.length >= 2)
{ {

View File

@@ -164,7 +164,7 @@ public class EssentialsPlayerListener implements Listener
@EventHandler(priority = EventPriority.MONITOR) @EventHandler(priority = EventPriority.MONITOR)
public void onPlayerJoin(final PlayerJoinEvent event) public void onPlayerJoin(final PlayerJoinEvent event)
{ {
ess.getPlugin().scheduleAsyncDelayedTask( ess.getPlugin().runTaskAsynchronously(
new Runnable() new Runnable()
{ {
@Override @Override

View File

@@ -37,7 +37,7 @@ public class MetricsListener implements Listener
ess.getLogger().log(Level.INFO, _("metrics3")); ess.getLogger().log(Level.INFO, _("metrics3"));
settings.getData().getGeneral().setMetricsEnabled(true); settings.getData().getGeneral().setMetricsEnabled(true);
settings.queueSave(); settings.queueSave();
ess.getPlugin().scheduleAsyncDelayedTask(starter, 5 * 1200); ess.getPlugin().runTaskLaterAsynchronously(starter, 5 * 1200);
} }
} }
} }

View File

@@ -28,7 +28,7 @@ public abstract class AbstractDelayedYamlFileReader<T extends StorageObject> imp
} }
else else
{ {
ess.getPlugin().scheduleAsyncDelayedTask(this); ess.getPlugin().runTaskAsynchronously(this);
} }
} }

View File

@@ -21,7 +21,7 @@ public abstract class AbstractDelayedYamlFileWriter implements Runnable
public void schedule() public void schedule()
{ {
ess.getPlugin().scheduleAsyncDelayedTask(this); ess.getPlugin().runTaskAsynchronously(this);
} }
public abstract File getFile(); public abstract File getFile();

View File

@@ -47,7 +47,7 @@ public abstract class StorageObjectMap<I> extends CacheLoader<String, I> impleme
private void loadAllObjectsAsync() private void loadAllObjectsAsync()
{ {
ess.getPlugin().scheduleAsyncDelayedTask( ess.getPlugin().runTaskAsynchronously(
new Runnable() new Runnable()
{ {
@Override @Override

View File

@@ -44,7 +44,7 @@ public class StorageQueue implements Runnable
} }
else if (state == RequestState.SCHEDULE) else if (state == RequestState.SCHEDULE)
{ {
plugin.scheduleAsyncDelayedTask(request.getRunnable()); plugin.runTaskAsynchronously(request.getRunnable());
} }
} }
requests.clear(); requests.clear();
@@ -74,7 +74,7 @@ public class StorageQueue implements Runnable
{ {
synchronized (lock) synchronized (lock)
{ {
plugin.scheduleAsyncDelayedTask(this); plugin.runTaskAsynchronously(this);
} }
} }

View File

@@ -90,7 +90,7 @@ public class StateMachine extends AbstractWorkListener implements Runnable
public void startWork() public void startWork()
{ {
iterator = states.values().iterator(); iterator = states.values().iterator();
Bukkit.getScheduler().scheduleAsyncDelayedTask(getPlugin(), this); //Should this be async? (method deprecated) Bukkit.getScheduler().runTaskAsynchronously(getPlugin(), this); //Should this be async? (method deprecated)
} }
@Override @Override
@@ -149,7 +149,7 @@ public class StateMachine extends AbstractWorkListener implements Runnable
{ {
StateMachine.this.player.sendMessage(message); StateMachine.this.player.sendMessage(message);
} }
Bukkit.getScheduler().scheduleAsyncDelayedTask(getPlugin(), StateMachine.this); //Should this be async? (method deprecated) Bukkit.getScheduler().runTaskAsynchronously(getPlugin(), StateMachine.this); //Should this be async? (method deprecated)
} }
}); });
} }

View File

@@ -31,7 +31,7 @@ public class InstallModule implements Runnable, Task
@Override @Override
public void start() public void start()
{ {
Bukkit.getScheduler().scheduleAsyncDelayedTask(listener.getPlugin(), this); //Should this be async? (method deprecated) Bukkit.getScheduler().runTaskAsynchronously(listener.getPlugin(), this); //Should this be async? (method deprecated)
} }
@Override @Override

View File

@@ -44,7 +44,7 @@ public class SelfUpdate extends AbstractWorkListener implements Task, Runnable
@Override @Override
public void run() public void run()
{ {
Bukkit.getScheduler().scheduleAsyncDelayedTask( //Should this be async? (method deprecated) Bukkit.getScheduler().runTaskAsynchronously( //Should this be async? (method deprecated)
getPlugin(), new Runnable() getPlugin(), new Runnable()
{ {
@Override @Override

View File

@@ -75,7 +75,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<bukkit.version>1.4.7-R0.1</bukkit.version> <bukkit.version>1.4.7-R1.0</bukkit.version>
<build.number>Unknown</build.number> <build.number>Unknown</build.number>
<org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>true</org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs> <org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>true</org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>
<org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>2</org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width> <org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>2</org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>