mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Handler inheritance is now working
this code should also perform somewhat better
This commit is contained in:
@ -58,11 +58,12 @@ final class AsyncEventInheritanceTest extends Test{
|
||||
$plugin = $this->getPlugin();
|
||||
$classes = self::EXPECTED_ORDER;
|
||||
shuffle($classes);
|
||||
foreach($classes as $event){
|
||||
foreach($classes as $class){
|
||||
$plugin->getServer()->getPluginManager()->registerAsyncEvent(
|
||||
$event,
|
||||
function(AsyncEvent $event) : ?Promise{
|
||||
$this->callOrder[] = $event::class;
|
||||
$class,
|
||||
function(AsyncEvent $event) use ($class) : ?Promise{
|
||||
var_dump($class);
|
||||
$this->callOrder[] = $class;
|
||||
return null;
|
||||
},
|
||||
EventPriority::NORMAL,
|
||||
|
Reference in New Issue
Block a user