menu
#5776813 Call to undefined method pocketmine\Server::getPlayer()

Submitted by PocketMine-MP 4.0.6

General information

Version: 4.0.6
Git commit: f7d25f25
Plugin involvement: Direct
Report date: 2022-01-14 20:36:22 +0000 UTC
Server uptime: 0 days 0 hours 59 minutes 51 seconds

System Information

PHP version: 8.0.13
Operating system: linux
System banner: Linux 5a239b6e-4f8f-43dd-ac6c-c8a4e42793d6 5.4.0-94-generic #106-Ubuntu SMP Thu Jan 6 23:58:14 UTC 2022 x86_64

Error information

Warning: the WorldProtect plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\Server::getPlayer()
File: plugins/WorldProtect (2).phar/src/aliuly/worldprotect/WpProtectMgr
Line: #76
Error level: Error
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
											  "help" => mc::_("Only authorized (or op) can build"),
"permission" => "wp.cmd.protect"]);
}

public function onSCommand(CommandSender $c,Command $cc,$scmd,$world,array $args) {
switch ($scmd) {
case "add":
if (!count($args)) return false;
foreach ($args as $i) {
$player = $this->owner->getServer()->getPlayer($i);
if (!$player) {
$player = $this->owner->getServer()->getOfflinePlayer($i);
if ($player == null || !$player->hasPlayedBefore()) {
$c->sendMessage(mc::_("[WP] %1%: not found",$i));
continue;
}
}
$iusr = strtolower($player->getName());
$this->owner->authAdd($world,$iusr);
$c->sendMessage(mc::_("[WP] %1% added to %2%'s auth list",$i,$world));
#0 plugins/WorldProtect (2).phar/src/aliuly/worldprotect/common/SubCommandMap(48): aliuly\worldprotect\WpProtectMgr->onSCommand(object pocketmine\player\Player#26579, object pocketmine\command\PluginCommand#23690, string[3] add, string[5] world, array[1])
#1 plugins/WorldProtect (2).phar/src/aliuly/worldprotect/common/BasicPlugin(123): aliuly\worldprotect\common\SubCommandMap->dispatchSCmd(object pocketmine\player\Player#26579, object pocketmine\command\PluginCommand#23690, array[1], string[5] world)
#2 plugins/WorldProtect (2).phar/src/aliuly/worldprotect/Main(225): aliuly\worldprotect\common\BasicPlugin->dispatchSCmd(object pocketmine\player\Player#26579, object pocketmine\command\PluginCommand#23690, array[2], string[5] world)
#3 pmsrc/src/command/PluginCommand(54): aliuly\worldprotect\Main->onCommand(object pocketmine\player\Player#26579, object pocketmine\command\PluginCommand#23690, string[2] wp, array[2])
#4 pmsrc/src/command/SimpleCommandMap(220): pocketmine\command\PluginCommand->execute(object pocketmine\player\Player#26579, string[2] wp, array[2])
#5 pmsrc/src/Server(1406): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\player\Player#26579, string[11] wp add word)
#6 pmsrc/src/player/Player(1342): pocketmine\Server->dispatchCommand(object pocketmine\player\Player#26579, string[11] wp add word)
#7 pmsrc/src/network/mcpe/handler/InGamePacketHandler(711): pocketmine\player\Player->chat(string[12] /wp add word)
#8 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(60): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#113466)
#9 pmsrc/src/network/mcpe/NetworkSession(395): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#91866)
#10 pmsrc/src/network/mcpe/NetworkSession(358): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#113466, string[33] M./wp add word..Ai..KL...?g).Q...)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(192): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[36] S...//PHLIQ(./JaX.............".S...)
#12 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(integer 0, string[45] ...pQ...#@.....i?..dX.+2.z|hP.%....h........v)
#13 pmsrc/src/network/mcpe/raklib/RakLibInterface(122): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#24964)
#14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#15 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#16 pmsrc/src/Server(1657): pocketmine\snooze\SleeperHandler->sleepUntil(double 1642192582.824)
#17 pmsrc/src/Server(1044): pocketmine\Server->tickProcessor()
#18 pmsrc/src/PocketMine(303): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#19 pmsrc/src/PocketMine(326): pocketmine\server()
#20 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show