Class ReschedulingTask
java.lang.Object
de.eldoria.eldoutilities.threading.ReschedulingTask
- Direct Known Subclasses:
QueuingSelfSchedulingTask
,SelfSchedulingWorker
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Cancel the task if it is running.org.bukkit.plugin.Plugin
boolean
isActive()
Check if the task is active.boolean
Check if the task is running.abstract void
run()
void
schedule()
Schedules the task if it is not running.void
shutdown()
Shuts down the scheduler.
-
Constructor Details
-
ReschedulingTask
public ReschedulingTask(org.bukkit.plugin.Plugin plugin)
-
-
Method Details
-
schedule
public void schedule()Schedules the task if it is not running. -
cancel
public void cancel()Cancel the task if it is running. -
shutdown
public void shutdown()Shuts down the scheduler. It can be not scheduled again after this. -
isRunning
public boolean isRunning()Check if the task is running.- Returns:
- true if the task is running
-
isActive
public boolean isActive()Check if the task is active.If the task is not active you cant schedule it.
- Returns:
- true if active
-
run
public abstract void run() -
getPlugin
public org.bukkit.plugin.Plugin getPlugin()
-