When I put a title message and sound on a delay task (from join) it does not display and it shows no errors, why is this?? PHP: <?phpnamespace basprohop\JoinEvent;use pocketmine\Player;use pocketmine\Server;use pocketmine\utils\TextFormat;use pocketmine\scheduler\PluginTask;use basprohop\CombinedSlots;use pocketmine\math\Vector3;use pocketmine\level\sound\LaunchSound;class ShowTask extends PluginTask { /** @var Player */ private $player; public function __construct($plugin, Player $player) { parent::__construct($plugin); $this->player = $player; } public function onRun($currentTick) { $this->player->addTitle("#bla#nk#", "", 5, 80, 20); $level = $this->player->getLevel(); $level->addSound(new LaunchSound(new Vector3(49, 45, -890))); return true; }}
How long is the task delayed? Why is your constructor not compatible with PluginTask ? Why are you passing Player objects to a task? Are you certain you scheduled the task properly?