menu
#3977029 Argument 1 passed to Swourire\AdminTroll\Functions\functions::switchPlayer() must be an instance of pocketmine\Player, instance of slapper\entities\SlapperHuman given

Submitted by PocketMine-MP 3.11.1

General information

Version: 3.11.1
Git commit: 40a2211a
Plugin involvement: Direct
Report date: 2020-03-24 20:15:48 +0000 UTC

System Information

PHP version: 7.3.12
Operating system: win
System banner: Windows NT YENTRIX 10.0 build 18362 (Windows 10) AMD64

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 slapper\entities\SlapperHuman given
File: plugins/AdminTroll-a-plugin-PocketMine-MP-.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-a-plugin-PocketMine-MP-.phar/src/Swourire/AdminTroll/Events/Events(72): Swourire\AdminTroll\Functions\functions->switchPlayer(object slapper\entities\SlapperHuman, object pocketmine\Player)
#1 src/pocketmine/plugin/MethodEventExecutor(38): Swourire\AdminTroll\Events\Events->onPlayerHit(object pocketmine\event\entity\EntityDamageByChildEntityEvent)
#2 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(object Swourire\AdminTroll\Events\Events, object pocketmine\event\entity\EntityDamageByChildEntityEvent)
#3 src/pocketmine/event/Event(95): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\entity\EntityDamageByChildEntityEvent)
#4 src/pocketmine/entity/Entity(992): pocketmine\event\Event->call()
#5 src/pocketmine/entity/Living(574): pocketmine\entity\Entity->attack(object pocketmine\event\entity\EntityDamageByChildEntityEvent)
#6 src/pocketmine/entity/projectile/Projectile(318): pocketmine\entity\Living->attack(object pocketmine\event\entity\EntityDamageByChildEntityEvent)
#7 src/pocketmine/entity/projectile/Projectile(252): pocketmine\entity\projectile\Projectile->onHitEntity(object slapper\entities\SlapperHuman, object pocketmine\math\RayTraceResult)
#8 src/pocketmine/entity/Entity(1472): pocketmine\entity\projectile\Projectile->move(double -0.66768893254505, double -0.30689207844222, double -1.2747900779424)
#9 src/pocketmine/level/Level(853): pocketmine\entity\Entity->onUpdate(integer 7739)
#10 src/pocketmine/level/Level(786): pocketmine\level\Level->actuallyDoTick(integer 7739)
#11 src/pocketmine/Server(2443): pocketmine\level\Level->doTick(integer 7739)
#12 src/pocketmine/Server(2574): pocketmine\Server->checkTickUpdates(integer 7739, double 1585080948.0372)
#13 src/pocketmine/Server(2343): pocketmine\Server->tick()
#14 src/pocketmine/Server(2203): pocketmine\Server->tickProcessor()
#15 src/pocketmine/Server(1785): pocketmine\Server->start()
#16 src/pocketmine/PocketMine(272): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[64] C:\Users\PC Gamer\Desktop\Karmaporros-Tests\PHP-7.3-Windows-x64\, string[72] C:\Users\PC Gamer\Desktop\Karmaporros-Tests\PHP-7.3-Windows-x64\plugins\)
#17 src/pocketmine/PocketMine(295): pocketmine\server()
#18 (1): require(string[119] phar://C:/Users/PC Gamer/Desktop/Karmaporros-Tests/PHP-7.3-Windows-x64/PocketMin)

Loaded Plugins

  • Show

Server Settings

  • Show