mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Beware matching items that aren't actually correct
This would only ever happen if we received the actions in the wrong order, but that wouldn't surprise me.
This commit is contained in:
@ -191,7 +191,7 @@ class NetworkInventoryAction{
|
||||
$window = $player->getCraftingGrid();
|
||||
|
||||
//DROP_CONTENTS doesn't bother telling us what slot the item is in, so we find it ourselves
|
||||
$inventorySlot = $window->first($this->oldItem);
|
||||
$inventorySlot = $window->first($this->oldItem, true);
|
||||
if($inventorySlot === -1){
|
||||
throw new \InvalidStateException("Fake container " . get_class($window) . " for " . $player->getName() . " does not contain $this->oldItem");
|
||||
}
|
||||
|
Reference in New Issue
Block a user