Skip to content

Promise ​

final class · pocketmine\promise\Promise · source

Methods ​

all() ​

php
public static function all(array $promises) : \pocketmine\promise\Promise

Returns a promise that will resolve only once all the Promises in $promises have resolved. The resolution value of the returned promise will be an array containing the resolution values of each Promises in $promises indexed by the respective Promises' array keys.

isResolved() ​

php
public function isResolved() : bool

onCompletion() ​

php
public function onCompletion(\Closure $onSuccess, \Closure $onFailure) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.