mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-31 23:33:06 +00:00
ChiseledBookshelf: Fix duplication bug (#6086)
Also fixes being able to put more than 1 book in the slot
This commit is contained in:
parent
ee26d6d570
commit
c9163a1505
@ -113,7 +113,7 @@ class ChiseledBookshelf extends Opaque{
|
|||||||
$this->setSlot($slot, false);
|
$this->setSlot($slot, false);
|
||||||
}elseif($item instanceof WritableBookBase || $item instanceof Book || $item instanceof EnchantedBook){
|
}elseif($item instanceof WritableBookBase || $item instanceof Book || $item instanceof EnchantedBook){
|
||||||
//TODO: type tags like blocks would be better for this
|
//TODO: type tags like blocks would be better for this
|
||||||
$inventory->setItem($slot->value, $item);
|
$inventory->setItem($slot->value, $item->pop());
|
||||||
$this->setSlot($slot, true);
|
$this->setSlot($slot, true);
|
||||||
}else{
|
}else{
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user