diff options
author | Lukas Pioch <lukas@zgow.de> | 2017-08-01 18:54:31 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2017-08-27 14:54:42 +0200 |
commit | 2126a1719d60a232d8e57b9a0dfec1b5ef556ca4 (patch) | |
tree | 687b2732a676b43095f061fcff9e8c5da1203998 /src/Protocol/Protocol_1_9.cpp | |
parent | Added end check for stack, use ForEachArrayElement to read table (diff) | |
download | cuberite-2126a1719d60a232d8e57b9a0dfec1b5ef556ca4.tar cuberite-2126a1719d60a232d8e57b9a0dfec1b5ef556ca4.tar.gz cuberite-2126a1719d60a232d8e57b9a0dfec1b5ef556ca4.tar.bz2 cuberite-2126a1719d60a232d8e57b9a0dfec1b5ef556ca4.tar.lz cuberite-2126a1719d60a232d8e57b9a0dfec1b5ef556ca4.tar.xz cuberite-2126a1719d60a232d8e57b9a0dfec1b5ef556ca4.tar.zst cuberite-2126a1719d60a232d8e57b9a0dfec1b5ef556ca4.zip |
Diffstat (limited to 'src/Protocol/Protocol_1_9.cpp')
-rw-r--r-- | src/Protocol/Protocol_1_9.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp index 9879140d4..aba0a9d01 100644 --- a/src/Protocol/Protocol_1_9.cpp +++ b/src/Protocol/Protocol_1_9.cpp @@ -2953,6 +2953,7 @@ void cProtocol_1_9_0::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, con cParsedNBT NBT(BookData.c_str(), BookData.size()); cItem BookItem; + bool IsSigned = true; if (a_Channel == "MC|BSign") { BookItem = cItem(E_ITEM_WRITTEN_BOOK); @@ -2961,13 +2962,11 @@ void cProtocol_1_9_0::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, con } else { + IsSigned = false; BookItem = cItem(E_ITEM_BOOK_AND_QUILL); cBookContent::ParseFromNBT(0, BookItem.m_BookContent, NBT); } - // If true, player has clicked on the sign button - bool IsSigned = (BookItem.m_ItemType == E_ITEM_WRITTEN_BOOK) ? true : false; - if (cRoot::Get()->GetPluginManager()->CallHookPlayerEditingBook(Player, BookItem.m_BookContent, IsSigned)) { // Plugin denied the editing of the book |