|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quartercode.quarterbukkit.api.scheduler.ScheduleTask
public abstract class ScheduleTask
This class is for implementing an easy to use schedule-task fir the Bukkit-Scheduler.
Constructor Summary | |
---|---|
ScheduleTask(org.bukkit.plugin.Plugin plugin)
Creates a schedule task with a custom Plugin . |
Method Summary | |
---|---|
ScheduleTask |
add(java.util.Collection<ScheduleTask> collection)
Adds the schedule task to a Collection (this may be a ScheduleGroup ). |
ScheduleTask |
cancel()
Cancels this schedule taks. |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
boolean |
isRunning()
Returns if the ScheduleTask is running. |
ScheduleTask |
run(WrongThreadAction wrongThreadAction,
boolean sync,
long delay)
Runs the scheduler once with a delay. |
ScheduleTask |
run(WrongThreadAction wrongThreadAction,
boolean sync,
long delay,
long period)
Runs the scheduler repeating with a delay until it's cancelled. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
---|
run |
Constructor Detail |
---|
public ScheduleTask(org.bukkit.plugin.Plugin plugin)
Plugin
. This is recommended!
plugin
- The custom plugin.Method Detail |
---|
public boolean isRunning()
public ScheduleTask add(java.util.Collection<ScheduleTask> collection)
Collection
(this may be a ScheduleGroup
).
collection
- The Collection
to add the task.
public ScheduleTask run(WrongThreadAction wrongThreadAction, boolean sync, long delay)
wrongThreadAction
- What to do if the thread is not valid.sync
- Should the scheduler runs synced with the Bukkit-Main-Thread
.delay
- The delay in ticks.
public ScheduleTask run(WrongThreadAction wrongThreadAction, boolean sync, long delay, long period)
wrongThreadAction
- What to do if the thread is not valid.sync
- Should the scheduler runs synced with the Bukkit-Main-Thread
.delay
- The delay in ticks.period
- The delay between two repeatings in ticks.
public ScheduleTask cancel()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |