Closed Smorted closed 7 months ago
PocketMine-MP version: 5.10.0 [Protocol 630] Git commit: daeba95101e6278d1f2552397043d29d29d272f8 PHP version: 8.1.26 OS: Linux, linux A PLUGIN WAS INVOLVED IN THIS CRASH BAD PLUGIN: MurderMysteryLED Thread: Main Error: pocketmine\inventory\BaseInventory::addItem(): Argument #2 must be of type pocketmine\item\Item, int given, called in /home/container/plugins/MurderMysteryLED-main/src/mm/game/Game.php on line 862 File: pmsrc/src/inventory/BaseInventory Line: 205 Type: TypeError Backtrace: #0 plugins/MurderMysteryLED-main/src/mm/game/Game(862): pocketmine\inventory\BaseInventory->addItem(object pocketmine\item\Item#114701, int 0, int 8) #1 pmsrc/src/event/RegisteredListener(61): mm\game\Game->onPickup(object pocketmine\event\entity\EntityItemPickupEvent#80056) #2 pmsrc/src/event/Event(63): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\entity\EntityItemPickupEvent#80056) #3 pmsrc/src/entity/object/ItemEntity(335): pocketmine\event\Event->call() #4 pmsrc/src/player/Player(1249): pocketmine\entity\object\ItemEntity->onCollideWithPlayer(object pocketmine\player\Player#139219) #5 pmsrc/src/player/Player(1450): pocketmine\player\Player->checkNearEntities() #6 pmsrc/src/world/World(997): pocketmine\player\Player->onUpdate(int 2295) #7 pmsrc/src/world/World(922): pocketmine\world\World->actuallyDoTick(int 2295) #8 pmsrc/src/world/WorldManager(351): pocketmine\world\World->doTick(int 2295) #9 pmsrc/src/Server(1805): pocketmine\world\WorldManager->tick(int 2295) #10 pmsrc/src/Server(1687): pocketmine\Server->tick() #11 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor() #12 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/) #13 pmsrc/src/PocketMine(364): pocketmine\server() #14 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php) Code: [196] [197] if($count <= 0){ [198] return $item->getCount(); [199] } [200] } [201] [202] return $item->getCount() - $count; [203] } [204] [205] public function addItem(Item ...$slots) : array{ [206] /** @var Item[] $itemSlots */ [207] /** @var Item[] $slots */ [208] $itemSlots = []; [209] foreach($slots as $slot){ [210] if(!$slot->isNull()){ [211] $itemSlots[] = clone $slot; [212] } [213] } [214] [215] /** @var Item[] $returnSlots */ ===END CRASH DUMP===
with second latest commit try
well this was fixed [tested]