Skip to content

Commit

Permalink
Merge pull request iTXTech#1721 from iTXTech/Alcatraz-Du-patch-1
Browse files Browse the repository at this point in the history
Fix bug that resultitem will be dropped when a creative player with full items
  • Loading branch information
ishitatsuyuki authored Aug 21, 2016
2 parents 2f1d1b9 + 6a3e73b commit 640718c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pocketmine/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -3484,7 +3484,7 @@ public function handleDataPacket(DataPacket $packet){
}

$extraItem = $this->inventory->addItem($recipe->getResult());
if(count($extraItem) > 0){ //Could not add all the items to our inventory (not enough space)
if(count($extraItem) > 0 and !$this->isCreative()){ //Could not add all the items to our inventory (not enough space)
foreach($extraItem as $item){
$this->level->dropItem($this, $item);
}
Expand Down

0 comments on commit 640718c

Please sign in to comment.