menu
#9718775 Object of class pocketmine\item\Armor could not be converted to int

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:27:04 +0000 UTC
Server uptime: 0 days 0 hours 1 minutes 19 seconds

System Information

PHP version: 8.1.26
JIT status: Not available
Operating system: linux
System banner: Linux 02e4f5f5-9cce-4011-a07f-f52e767e8b23 5.10.0-26-amd64 #1 SMP Debian 5.10.197-1 (2023-09-29) x86_64

Error information

Warning: the SkyWars plugin was directly involved in this crash. Please contact the plugin author.
Thread: Main
Message: Object of class pocketmine\item\Armor could not be converted to int
File: plugins/SkyWars - PM5/src/svile/skywars/SWarena
Line: #334
Type: ErrorException
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
				if ($tile instanceof Chest) {
//CLEARS CHESTS
for ($i = 0; $i < $tile->getInventory()->getSize(); $i++) {
$tile->getInventory()->setItem($i, VanillaBlocks::AIR()->asItem());
}
//SET CONTENTS
if (empty($contents))
$contents = $this->pg->getChestContents();
foreach (array_shift($contents) as $key => $val) {
$itemId = is_int($val[0]) ? $val[0] : (int)$val[0];

// Actualiza el tipo de datos del ítem
$refil1id = GlobalItemDataHandlers::getUpgrader()->upgradeItemTypeDataInt($itemId, 0, $val[1], null);

// Crea el ítem actualizado
$refil1 = GlobalItemDataHandlers::getDeserializer()->deserializeStack($refil1id);

// Establece el ítem en el inventario
$tile->getInventory()->setItem($key, $refil1);
//$tile->getInventory()->setItem($key, GlobalItemDataHandlers::getDeserializer()->deserializeStack(GlobalItemDataHandlers::getUpgrader()->upgradeItemTypeDataInt($val[0], 0, $val[1], null)));
#0 plugins/SkyWars - PM5/src/svile/skywars/SWarena(334): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 2, string[67] Object of class pocketmine\item\Armor could not be converted to int, string[67] /home/container/plugins/SkyWars - PM5/src/svile/skywars/SWarena.php, int 334)
#1 plugins/SkyWars - PM5/src/svile/skywars/SWarena(872): svile\skywars\SWarena->refillChests()
#2 plugins/SkyWars - PM5/src/svile/skywars/SWarena(362): svile\skywars\SWarena->start()
#3 plugins/SkyWars - PM5/src/svile/skywars/SWtimer(65): svile\skywars\SWarena->tick()
#4 pmsrc/src/scheduler/TaskHandler(113): svile\skywars\SWtimer->onRun()
#5 pmsrc/src/scheduler/TaskScheduler(137): pocketmine\scheduler\TaskHandler->run()
#6 pmsrc/src/plugin/PluginManager(533): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(int 1561)
#7 pmsrc/src/Server(1791): pocketmine\plugin\PluginManager->tickSchedulers(int 1561)
#8 pmsrc/src/Server(1680): pocketmine\Server->tick()
#9 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#10 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#11 pmsrc/src/PocketMine(364): pocketmine\server()
#12 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