mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Added ServerInterface.schedule(delay, period, task).
This commit is contained in:
parent
cc0e39b493
commit
a4ccadacdc
@ -44,4 +44,17 @@ public abstract class ServerInterface {
|
|||||||
* Reload WorldEdit configuration.
|
* Reload WorldEdit configuration.
|
||||||
*/
|
*/
|
||||||
public abstract void reload();
|
public abstract void reload();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Schedules the given <code>task</code> to be invoked once every <code>period</code> ticks
|
||||||
|
* after an initial delay of <code>delay</code> ticks.
|
||||||
|
*
|
||||||
|
* @param delay Delay in server ticks before executing first repeat
|
||||||
|
* @param period Period in server ticks of the task
|
||||||
|
* @param task Task to be executed
|
||||||
|
* @return Task id number (-1 if scheduling failed)
|
||||||
|
*/
|
||||||
|
public int schedule(long delay, long period, Runnable task) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,4 +48,8 @@ public class BukkitServerInterface extends ServerInterface {
|
|||||||
plugin.loadConfiguration();
|
plugin.loadConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int schedule(long delay, long period, Runnable task) {
|
||||||
|
return Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, task, delay, period);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user