Closed SalmonDE closed 6 years ago
When $player->getInventory()->canAddItem($dropItem) returns false PiggyCrates still tries to add the item to the players inventory. Of course this fails but the plugin still removes the crate key from the player.
$player->getInventory()->canAddItem($dropItem)
This behaviour should be prevented.
When
$player->getInventory()->canAddItem($dropItem)
returns false PiggyCrates still tries to add the item to the players inventory. Of course this fails but the plugin still removes the crate key from the player.This behaviour should be prevented.