mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
Clean up WritableBook hierarchy
This commit is contained in:
@ -2333,7 +2333,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
||||
public function handleBookEdit(BookEditPacket $packet) : bool{
|
||||
/** @var WritableBook $oldBook */
|
||||
$oldBook = $this->inventory->getItem($packet->inventorySlot);
|
||||
if($oldBook->getId() !== Item::WRITABLE_BOOK){
|
||||
if(!($oldBook instanceof WritableBook)){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user