mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
Don't mess with NBT when creating signed books
This commit is contained in:
parent
73a847123b
commit
8f64d6b053
@ -640,10 +640,11 @@ class InGamePacketHandler extends PacketHandler{
|
||||
break;
|
||||
case BookEditPacket::TYPE_SIGN_BOOK:
|
||||
/** @var WrittenBook $newBook */
|
||||
$newBook = VanillaItems::WRITTEN_BOOK()->setNamedTag($oldBook->getNamedTag());
|
||||
$newBook->setAuthor($packet->author);
|
||||
$newBook->setTitle($packet->title);
|
||||
$newBook->setGeneration(WrittenBook::GENERATION_ORIGINAL);
|
||||
$newBook = VanillaItems::WRITTEN_BOOK()
|
||||
->setPages($oldBook->getPages())
|
||||
->setAuthor($packet->author)
|
||||
->setTitle($packet->title)
|
||||
->setGeneration(WrittenBook::GENERATION_ORIGINAL);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user