$this->getServer()->getPluginManager()->callEvent($ev = new PlayerLevelUpEvent($blalla)); make sure your PlayerLevelUpEvent extends PlayerEvent https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/plugin/PluginManager.php#L688