PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\scheduler\CallbackTask Class Reference
+ Inheritance diagram for pocketmine\scheduler\CallbackTask:
+ Collaboration diagram for pocketmine\scheduler\CallbackTask:

Public Member Functions

 __construct (callable $callable, array $args=[])
 
 getCallable ()
 
 onRun ($currentTicks)
 
 getHandler ()
 
 getTaskId ()
 
 setHandler ($taskHandler)
 
 onCancel ()
 

Protected Attributes

 $callable
 
 $args
 

Detailed Description

Allows the creation of simple callbacks with extra data The last parameter in the callback will be this object

If you want to do a task in a Plugin, consider extending PluginTask to your needs

Definition at line 30 of file CallbackTask.php.

Constructor & Destructor Documentation

pocketmine\scheduler\CallbackTask::__construct ( callable  $callable,
array  $args = [] 
)
Parameters
callable$callable
array$args

Definition at line 42 of file CallbackTask.php.

Member Function Documentation

pocketmine\scheduler\CallbackTask::getCallable ( )
Returns
callable

Definition at line 51 of file CallbackTask.php.

pocketmine\scheduler\Task::getHandler ( )
finalinherited
Returns
TaskHandler

Definition at line 32 of file Task.php.

pocketmine\scheduler\Task::getTaskId ( )
finalinherited
Returns
int

Definition at line 39 of file Task.php.

pocketmine\scheduler\Task::onCancel ( )
inherited

Actions to execute if the Task is cancelled

Definition at line 68 of file Task.php.

pocketmine\scheduler\Task::setHandler (   $taskHandler)
finalinherited
Parameters
TaskHandler$taskHandler

Definition at line 50 of file Task.php.


The documentation for this class was generated from the following file: