From 90cc89fe15ea8f21596f50b42b0819e0f4c8e363 Mon Sep 17 00:00:00 2001 From: rjworks Date: Sun, 12 Jul 2020 12:18:35 -0600 Subject: [PATCH] Remove $this->getOwner() because it's causing crash --- src/icontrolu/InvisibilityTask.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/icontrolu/InvisibilityTask.php b/src/icontrolu/InvisibilityTask.php index 4227ce4..d25a212 100644 --- a/src/icontrolu/InvisibilityTask.php +++ b/src/icontrolu/InvisibilityTask.php @@ -4,6 +4,7 @@ use pocketmine\Player; use pocketmine\plugin\Plugin; use pocketmine\scheduler\Task; +use pocketmine\Server; class InvisibilityTask extends Task{ private $p; @@ -12,7 +13,7 @@ public function __construct(Plugin $main, Player $p){ } public function onRun(int $tick) : void{ $this->p->sendMessage("You are no longer invisible."); - foreach($this->getOwner()->getServer()->getOnlinePlayers() as $online){ + foreach(Server::getInstance()->getOnlinePlayers() as $online){ $online->showPlayer($this->p); } }