menu
#4656783 Argument 3 passed to DaPigGuy\PiggyFactions\commands\subcommands\management\CreateSubCommand::onNormalRun() must be an instance of DaPigGuy\PiggyFactions\players\FactionsPlayer, null given

Submitted by PocketMine-MP 3.16.0

General information

Version: 3.16.0
Git commit: d2f68836
Plugin involvement: Direct
Report date: 2020-11-21 21:53:53 +0000 UTC

System Information

PHP version: 7.3.21
Operating system: linux
System banner: Linux bfeeec75-1846-4778-bbbe-bb6349f4a3a0 4.18.0-193.14.2.el8_2.x86_64 #1 SMP Sun Jul 26 03:54:29 UTC 2020 x86_64

Error information

Warning: the PiggyFactions plugin was directly involved in this crash. Please contact the plugin author.
Message: Argument 3 passed to DaPigGuy\PiggyFactions\commands\subcommands\management\CreateSubCommand::onNormalRun() must be an instance of DaPigGuy\PiggyFactions\players\FactionsPlayer, null given
File: plugins/PiggyFactions.phar/src/DaPigGuy/PiggyFactions/commands/subcommands/management/CreateSubCommand
Line: #20
Error level: TypeError
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use DaPigGuy\PiggyFactions\players\FactionsPlayer;
use DaPigGuy\PiggyFactions\utils\Roles;
use pocketmine\Player;

class CreateSubCommand extends FactionSubCommand
{
/** @var bool */
protected $requiresFaction = false;

public function onNormalRun(Player $sender, ?Faction $faction, FactionsPlayer $member, string $aliasUsed, array $args): void
{
if ($faction !== null) {
$member->sendMessage("commands.already-in-faction");
return;
}
if ($this->plugin->getFactionsManager()->getFactionByName($args["name"]) !== null) {
$member->sendMessage("commands.create.name-taken", ["{NAME}" => $args["name"]]);
return;
}
if ($this->plugin->getConfig()->getNested("factions.enforce-alphanumeric-names", false) && !ctype_alnum($args["name"])) {
#0 plugins/PiggyFactions.phar/src/DaPigGuy/PiggyFactions/commands/subcommands/FactionSubCommand(91): DaPigGuy\PiggyFactions\commands\subcommands\management\CreateSubCommand->onNormalRun(object pocketmine\Player, NULL , NULL , string[6] create, array[1])
#1 plugins/PiggyFactions.phar/src/DaPigGuy/PiggyFactions/libs/CortexPE/Commando/BaseCommand(124): DaPigGuy\PiggyFactions\commands\subcommands\FactionSubCommand->onRun(object pocketmine\Player, string[6] create, array[1])
#2 plugins/PiggyFactions.phar/src/DaPigGuy/PiggyFactions/libs/CortexPE/Commando/BaseCommand(108): DaPigGuy\PiggyFactions\libs\CortexPE\Commando\BaseCommand->execute(object pocketmine\Player, string[6] create, array[1])
#3 src/pocketmine/command/SimpleCommandMap(248): DaPigGuy\PiggyFactions\libs\CortexPE\Commando\BaseCommand->execute(object pocketmine\Player, string[1] f, array[1])
#4 src/pocketmine/Server(1811): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\Player, string[14] f create NIGGA)
#5 src/pocketmine/Player(2322): pocketmine\Server->dispatchCommand(object pocketmine\Player, string[14] f create NIGGA)
#6 plugins/Sudo.phar/src/ErikX/sudo/Main(42): pocketmine\Player->chat(string[15] /f create NIGGA)
#7 src/pocketmine/command/PluginCommand(54): ErikX\sudo\Main->onCommand(object pocketmine\command\ConsoleCommandSender, object pocketmine\command\PluginCommand, string[4] sudo, array[3])
#8 src/pocketmine/command/SimpleCommandMap(248): pocketmine\command\PluginCommand->execute(object pocketmine\command\ConsoleCommandSender, string[4] sudo, array[4])
#9 src/pocketmine/Server(1811): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[24] sudo Piz /f create NIGGA)
#10 src/pocketmine/Server(1423): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[24] sudo Piz /f create NIGGA)
#11 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\Server->pocketmine\{closure}()
#12 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
#13 src/pocketmine/Server(2157): pocketmine\snooze\SleeperHandler->sleepUntil(double 1605995633.7107)
#14 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#15 src/pocketmine/Server(1588): pocketmine\Server->start()
#16 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
#17 src/pocketmine/PocketMine(304): pocketmine\server()
#18 (11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show