menu
#9718651 Nexus9w9\Clan\commands\subcommand\CreateSubCommand::execute(): Argument #2 ($profile) must be of type Nexus9w9\Clan\model\PlayerProfile, null given, called in phar:///home/container/plugins/Clan.phar/src/Nexus9w9/Clan/commands/default/ClanCommand.php on line 65

Submitted by PocketMine-MP 5.8.2

General information

Version: 5.8.2
Git commit: c3c81b09
Plugin involvement: Direct
Report date: 2023-12-03 04:59:48 +0000 UTC
Server uptime: 0 days 0 hours 1 minutes 11 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\commands\subcommand\CreateSubCommand::execute(): Argument #2 ($profile) must be of type Nexus9w9\Clan\model\PlayerProfile, null given, called in phar:///home/container/plugins/Clan.phar/src/Nexus9w9/Clan/commands/default/ClanCommand.php on line 65
File: plugins/Clan.phar/src/Nexus9w9/Clan/commands/subcommand/CreateSubCommand
Line: #17
Type: TypeError
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use Nexus9w9\Clan\manager\ClanManager;
use Nexus9w9\Clan\model\Clan;
use Nexus9w9\Clan\model\ClanRoles;
use Nexus9w9\Clan\model\PlayerProfile;
use pocketmine\player\Player;
use pocketmine\world\sound\XpLevelUpSound;

final class CreateSubCommand extends SubCommand {

public function execute(Player $player, PlayerProfile $profile, array $args): void {
if (is_null($profile->getClan())) {
$player->sendMessage("§l§cERRO! §r§cVocê já está em um clan.");
return;
}
$tag = $args[0] ?? null;
$name = $args[1] ?? null;

if (!$tag || !$name) {
$player->sendMessage("§l§cERRO! §r§cUtilize: /clan create <tag> <nome> para criar um clan.");
return;
#0 plugins/Clan.phar/src/Nexus9w9/Clan/commands/default/ClanCommand(65): Nexus9w9\Clan\commands\subcommand\CreateSubCommand->execute(object pocketmine\player\Player#149748, null, array[0])
#1 pmsrc/src/command/SimpleCommandMap(212): Nexus9w9\Clan\commands\default\ClanCommand->execute(object pocketmine\player\Player#149748, string[4] clan, array[0])
#2 pmsrc/src/Server(1418): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\player\Player#149748, string[11] clan create)
#3 pmsrc/src/player/Player(1512): pocketmine\Server->dispatchCommand(object pocketmine\player\Player#149748, string[11] clan create)
#4 pmsrc/src/network/mcpe/handler/InGamePacketHandler(826): pocketmine\player\Player->chat(string[12] /clan create)
#5 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(55): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#159126)
#6 pmsrc/src/network/mcpe/NetworkSession(445): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#65556)
#7 pmsrc/src/network/mcpe/NetworkSession(383): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#159126, string[34] M./clan [email protected]...._...M...H)
#8 pmsrc/src/network/mcpe/raklib/RakLibInterface(219): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[37] S...O.I.SH.JM,Iep........!w........<.)
#9 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[46] .`...j.N..u&..-.......+?.....%.\.M.u..K..vJ]^_)
#10 pmsrc/src/network/mcpe/raklib/RakLibInterface(111): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#179255)
#11 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#12 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\snooze\SleeperHandler->processNotifications()
#13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
#14 pmsrc/src/Server(1683): pocketmine\snooze\SleeperHandler->sleepUntil(float 1701579588.7953)
#15 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#16 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/)
#17 pmsrc/src/PocketMine(364): pocketmine\server()
#18 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