menu
#3743332 Argument 1 passed to GuiShop\Main::sendMainShop() must be an instance of pocketmine\Player, instance of pocketmine\command\ConsoleCommandSender given

Submitted by PocketMine-MP 3.11.4

General information

Version: 3.11.4
Git commit: 13f28d84
Plugin involvement: Direct
Report date: 2020-02-11 18:15:10 +0000 UTC

System Information

PHP version: 7.3.13
Operating system: win
System banner: Windows NT ORDINATEUR-THOM 10.0 build 18362 (Windows 10) AMD64

Error information

Warning: the GuiShop plugin was directly involved in this crash. Please contact the plugin author.
Message: Argument 1 passed to GuiShop\Main::sendMainShop() must be an instance of pocketmine\Player, instance of pocketmine\command\ConsoleCommandSender given
File: plugins/GuiShop_v1.0.0-BETA2.phar/src/GuiShop/Main
Line: #180
Error level: TypeError
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
  public function onEnable(){
$this->getServer()->getPluginManager()->registerEvents($this, $this);
PacketPool::registerPacket(new GuiDataPickItemPacket());
PacketPool::registerPacket(new ModalFormRequestPacket());
PacketPool::registerPacket(new ModalFormResponsePacket());
PacketPool::registerPacket(new ServerSettingsRequestPacket());
PacketPool::registerPacket(new ServerSettingsResponsePacket());
$this->item = [$this->Blocks, $this->Ores, $this->Farming, $this->Spawners, $this->Armor, $this->Tools, $this->Food, $this->Potions, $this->MobDrops, $this->Miscellaneous];
}
public function sendMainShop(Player $player){
$ui = new SimpleForm("§l§dSkyblock §fShop§r"," §fPurchase and Sell items Here!");
foreach($this->item as $category){
if(isset($category["ICON"])){
$rawitemdata = $category["ICON"];
$button = new Button($rawitemdata[0]);
$button->addImage('url', "http://avengetech.me/items/".$rawitemdata[1]."-".$rawitemdata[2].".png");
$ui->addButton($button);
}
}
$pk = new ModalFormRequestPacket();
#0 plugins/GuiShop_v1.0.0-BETA2.phar/src/GuiShop/Main(365): GuiShop\Main->sendMainShop(object pocketmine\command\ConsoleCommandSender)
#1 src/pocketmine/command/PluginCommand(58): GuiShop\Main->onCommand(object pocketmine\command\ConsoleCommandSender, object pocketmine\command\PluginCommand, string[4] shop, array[0])
#2 src/pocketmine/command/SimpleCommandMap(270): pocketmine\command\PluginCommand->execute(object pocketmine\command\ConsoleCommandSender, string[4] shop, array[0])
#3 src/pocketmine/Server(2065): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[4] shop)
#4 src/pocketmine/Server(1643): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[4] shop)
#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(2406): pocketmine\snooze\SleeperHandler->sleepUntil(double 1581444910.5917)
#8 src/pocketmine/Server(2250): pocketmine\Server->tickProcessor()
#9 src/pocketmine/Server(1811): pocketmine\Server->start()
#10 src/pocketmine/PocketMine(274): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[39] C:\Users\simon\OneDrive\Bureau\serveur\, string[47] C:\Users\simon\OneDrive\Bureau\serveur\plugins\)
#11 src/pocketmine/PocketMine(297): pocketmine\server()
#12 (1): require(string[94] phar://C:/Users/simon/OneDrive/Bureau/serveur/PocketMine-MP.phar/src/pocketmine/)

Loaded Plugins

  • Show

Server Settings

  • Show