menu
#9718723 Nexus9w9\Clan\model\Clan::getRole(): Argument #1 ($player) must be of type pocketmine\player\Player|string, Nexus9w9\Clan\model\PlayerProfile given, called in phar:///home/container/plugins/Clan.phar/src/Nexus9w9/Clan/commands/subcommand/InviteSubCommand.php on line 62

Submitted by PocketMine-MP 5.8.2

General information

Version: 5.8.2
Git commit: c3c81b09
Plugin involvement: Direct
Report date: 2023-12-03 05:15:41 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 59 seconds

System Information

PHP version: 8.1.25
JIT status: Not available
Operating system: linux
System banner: Linux aefbc3cc-b420-491e-8d95-4304cc6b183b 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64

Error information

Warning: the Clan plugin was directly involved in this crash. Please contact the plugin author.
Thread: Main
Message: Nexus9w9\Clan\model\Clan::getRole(): Argument #1 ($player) must be of type pocketmine\player\Player|string, Nexus9w9\Clan\model\PlayerProfile given, called in phar:///home/container/plugins/Clan.phar/src/Nexus9w9/Clan/commands/subcommand/InviteSubCommand.php on line 62
File: plugins/Clan.phar/src/Nexus9w9/Clan/model/Clan
Line: #81
Type: TypeError
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
     * Obtém a tag do Clan.
*/
public function getTag(): string {
return $this->tag;
}

/**
* Obtém o cargo do jogador no Clan.
*/
public function getRole(Player|string $player): ?ClanRoles {
$player = strtolower($player instanceof Player ? $player->getName() : $player);
if ($this->isMember($player)) {
return ProfileManager::getInstance()->get($player)->getRole();
}
return null;
}

/**
* Obtém um array contendo os membros do Clan.
*/
#0 plugins/Clan.phar/src/Nexus9w9/Clan/commands/subcommand/InviteSubCommand(62): Nexus9w9\Clan\model\Clan->getRole(object Nexus9w9\Clan\model\PlayerProfile#147666)
#1 plugins/Clan.phar/src/Nexus9w9/Clan/commands/default/ClanCommand(70): Nexus9w9\Clan\commands\subcommand\InviteSubCommand->execute(object pocketmine\player\Player#147860, object Nexus9w9\Clan\model\PlayerProfile#147666, array[1])
#2 pmsrc/src/command/SimpleCommandMap(212): Nexus9w9\Clan\commands\default\ClanCommand->execute(object pocketmine\player\Player#147860, string[4] clan, array[1])
#3 pmsrc/src/Server(1418): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\player\Player#147860, string[20] clan invite Nexus9w9)
#4 pmsrc/src/player/Player(1512): pocketmine\Server->dispatchCommand(object pocketmine\player\Player#147860, string[20] clan invite Nexus9w9)
#5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(826): pocketmine\player\Player->chat(string[21] /clan invite Nexus9w9)
#6 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(55): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#153518)
#7 pmsrc/src/network/mcpe/NetworkSession(445): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#67906)
#8 pmsrc/src/network/mcpe/NetworkSession(383): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#153518, string[43] M./clan invite Nexus9w9.dJNT.......?Y.!...H)
#9 pmsrc/src/network/mcpe/raklib/RakLibInterface(219): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[46] ....O.I.S..+.,IU.K.(-.,.dH...i}..b.I!.......<.)
#10 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[55] [email protected]....&Y.y.....x......j.q..O....6zK)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(111): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#179267)
#12 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#13 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\snooze\SleeperHandler->processNotifications()
#14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
#15 pmsrc/src/Server(1683): pocketmine\snooze\SleeperHandler->sleepUntil(float 1701580541.5398)
#16 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#17 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#3, object pocketmine\utils\MainLogger#6, string[16] /home/container/, string[24] /home/container/plugins/)
#18 pmsrc/src/PocketMine(364): pocketmine\server()
#19 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show