mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Added Inventory interfaces and types, updated long array() to []
This commit is contained in:
@ -39,7 +39,7 @@ class CallbackTask extends Task{
|
||||
* @param callable $callable
|
||||
* @param array $args
|
||||
*/
|
||||
public function __construct(callable $callable, array $args = array()){
|
||||
public function __construct(callable $callable, array $args = []){
|
||||
$this->callable = $callable;
|
||||
$this->args = $args;
|
||||
$this->args[] = $this;
|
||||
|
@ -37,7 +37,7 @@ class ServerScheduler{
|
||||
/**
|
||||
* @var TaskHandler[]
|
||||
*/
|
||||
protected $tasks = array();
|
||||
protected $tasks = [];
|
||||
|
||||
/** @var \Pool */
|
||||
protected $asyncPool;
|
||||
@ -134,7 +134,7 @@ class ServerScheduler{
|
||||
foreach($this->tasks as $task){
|
||||
$task->cancel();
|
||||
}
|
||||
$this->tasks = array();
|
||||
$this->tasks = [];
|
||||
$this->asyncPool->shutdown();
|
||||
$this->asyncTasks = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user