menu
#3749294 Argument 1 passed to MiniPet\PetGui::sendPetGui() must be an instance of pocketmine\Player, instance of pocketmine\command\ConsoleCommandSender given

Submitted by PocketMine-MP 3.11.1

General information

Version: 3.11.1
Git commit: 40a2211a
Plugin involvement: Direct
Report date: 2020-02-12 08:04:09 +0000 UTC

System Information

PHP version: 7.3.8
Operating system: linux
System banner: Linux www 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64

Error information

Warning: the MiniPet plugin was directly involved in this crash. Please contact the plugin author.
Message: Argument 1 passed to MiniPet\PetGui::sendPetGui() must be an instance of pocketmine\Player, instance of pocketmine\command\ConsoleCommandSender given
File: plugins/MiniPet_v1.4.2_1.14_PMMP.phar/src/MiniPet/PetGui
Line: #18
Error level: TypeError
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class PetGui
{
public $plugin;
public $attribute = ["攻击", "速度", "血量"];

public function __construct(PetSystem $plugin){
$this->plugin = $plugin;
}

public function sendPetGui(Player $player){
/*if(!$player->isOp()){
$this->sendMyPetList($player);
}else {*/
$form = new MyForm(
function (Player $p, $data) {
if (!isset($data)) {
return;
}
switch ($data) {
case "我的宠物":
#0 plugins/MiniPet_v1.4.2_1.14_PMMP.phar/src/MiniPet/PetSystem(117): MiniPet\PetGui->sendPetGui(object pocketmine\command\ConsoleCommandSender)
#1 src/pocketmine/command/PluginCommand(58): MiniPet\PetSystem->onCommand(object pocketmine\command\ConsoleCommandSender, object pocketmine\command\PluginCommand, string[3] pet, array[0])
#2 src/pocketmine/command/SimpleCommandMap(270): pocketmine\command\PluginCommand->execute(object pocketmine\command\ConsoleCommandSender, string[3] pet, array[0])
#3 src/pocketmine/Server(2026): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[3] pet)
#4 src/pocketmine/Server(1617): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[3] pet)
#5 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\Server->pocketmine\{closure}()
#6 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
#7 src/pocketmine/Server(2346): pocketmine\snooze\SleeperHandler->sleepUntil(double 1581494649.2087)
#8 src/pocketmine/Server(2203): pocketmine\Server->tickProcessor()
#9 src/pocketmine/Server(1785): pocketmine\Server->start()
#10 src/pocketmine/PocketMine(272): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[13] /home/xia/pm/, string[21] /home/xia/pm/plugins/)
#11 src/pocketmine/PocketMine(295): pocketmine\server()
#12 (1): require(string[68] phar:///home/xia/pm/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show