gordonmhy / Jail

A revolutionary player punishment system. Designed for @PocketMine servers.
GNU General Public License v3.0
32 stars 15 forks source link

please Fix it #56

Open AirLeMineral opened 3 years ago

AirLeMineral commented 3 years ago

PocketMine-MP Crash Dump Mon May 3 19:03:20 WIB 2021

Error: Argument 2 passed to pocketmine\inventory\BaseInventory::setItem() must be an instance of pocketmine\item\Item, string given, called in phar://C:/Users/lemineral/Desktop/PocketMine-MP-3.12.6/PocketMine-MP.phar/src/pocketmine/inventory/BaseInventory.php on line 136 File: pmsrc/src/pocketmine/inventory/BaseInventory Line: 159 Type: TypeError

A PLUGIN WAS INVOLVED IN THIS CRASH BAD PLUGIN: Jail v3.1.1

Code: [150] */ [151] public function dropContents(Level $level, Vector3 $position) : void{ [152] foreach($this->getContents() as $item){ [153] $level->dropItem($position, $item); [154] } [155] [156] $this->clearAll(); [157] } [158] [159] public function setItem(int $index, Item $item, bool $send = true) : bool{ [160] if($item->isNull()){ [161] $item = ItemFactory::get(Item::AIR, 0, 0); [162] }else{ [163] $item = clone $item; [164] } [165] [166] $oldItem = $this->getItem($index); [167] if($this->eventProcessor !== null){ [168] $newItem = $this->eventProcessor->onSlotChange($this, $index, $oldItem, $item); [169] if($newItem === null){