menu
#2470239 Argument 1 passed to Swourire\AdminTroll\Functions\functions::switchPlayer() must be an instance of pocketmine\Player, instance of Enes5519\PlayerHead\entities\HeadEntity given

Submitted by PocketMine-MP 3.8.3

General information

Version: 3.8.3
Git commit: 63e58677
Plugin involvement: Direct
Report date: 2019-06-12 11:59:10 +0000 UTC

System Information

PHP version: 7.2.16
Operating system: linux
System banner: Linux 43562bbc2fdc 4.4.0-148-generic #174-Ubuntu SMP Tue May 7 12:20:14 UTC 2019 x86_64

Error information

Warning: the AdminTroll plugin was directly involved in this crash. Please contact the plugin author.
Message: Argument 1 passed to Swourire\AdminTroll\Functions\functions::switchPlayer() must be an instance of pocketmine\Player, instance of Enes5519\PlayerHead\entities\HeadEntity given
File: plugins/AdminTroll.phar/src/Swourire/AdminTroll/Functions/functions
Line: #209
Error level: TypeError
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214

}

public function pumpkinPlayer(Player $player){
$pumpkin = Item::get(-155, 0, 1);
$player->getArmorInventory()->setHelmet($pumpkin);

}

public function switchPlayer(Player $sender, Player $target){
$positionsender = $sender->getPosition();
$sender->teleport($target->getPosition());
$target->teleport($positionsender);
}
}
#0 plugins/AdminTroll.phar/src/Swourire/AdminTroll/Events/Events(72): Swourire\AdminTroll\Functions\functions->switchPlayer(Enes5519\PlayerHead\entities\HeadEntity object, pocketmine\Player object)
#1 src/pocketmine/plugin/MethodEventExecutor(38): Swourire\AdminTroll\Events\Events->onPlayerHit(pocketmine\event\entity\EntityDamageByChildEntityEvent object)
#2 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(Swourire\AdminTroll\Events\Events object, pocketmine\event\entity\EntityDamageByChildEntityEvent object)
#3 src/pocketmine/event/Event(99): pocketmine\plugin\RegisteredListener->callEvent(pocketmine\event\entity\EntityDamageByChildEntityEvent object)
#4 src/pocketmine/entity/Entity(986): pocketmine\event\Event->call()
#5 src/pocketmine/entity/Living(572): pocketmine\entity\Entity->attack(pocketmine\event\entity\EntityDamageByChildEntityEvent object)
#6 plugins/PlayerHead.phar/src/Enes5519/PlayerHead/entities/HeadEntity(58): pocketmine\entity\Living->attack(pocketmine\event\entity\EntityDamageByChildEntityEvent object)
#7 src/pocketmine/entity/projectile/Projectile(318): Enes5519\PlayerHead\entities\HeadEntity->attack(pocketmine\event\entity\EntityDamageByChildEntityEvent object)
#8 src/pocketmine/entity/projectile/Projectile(252): pocketmine\entity\projectile\Projectile->onHitEntity(Enes5519\PlayerHead\entities\HeadEntity object, pocketmine\math\RayTraceResult object)
#9 src/pocketmine/entity/Entity(1466): pocketmine\entity\projectile\Projectile->move(double -0.5436660141476, double -0.24022184766114, double -1.1919902120793)
#10 src/pocketmine/level/Level(848): pocketmine\entity\Entity->onUpdate(integer 31086)
#11 src/pocketmine/level/Level(786): pocketmine\level\Level->actuallyDoTick(integer 31086)
#12 src/pocketmine/Server(2436): pocketmine\level\Level->doTick(integer 31086)
#13 src/pocketmine/Server(2567): pocketmine\Server->checkTickUpdates(integer 31086, double 1560340750.8428)
#14 src/pocketmine/Server(2336): pocketmine\Server->tick()
#15 src/pocketmine/Server(2196): pocketmine\Server->tickProcessor()
#16 src/pocketmine/Server(1775): pocketmine\Server->start()
#17 src/pocketmine/PocketMine(266): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /aternos/server/, string /aternos/server/plugins/)
#18 (1): require(string phar:///aternos/server/server.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show