summaryrefslogtreecommitdiffstats
path: root/src/Item.cpp
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2017-08-23 18:09:47 +0200
committerLukas Pioch <lukas@zgow.de>2017-08-27 17:49:08 +0200
commita5bae9f2f37921bfcf6203282155a8779c818120 (patch)
treeb51bcc42cdc65fd7d0d76fd312216ec0720c706a /src/Item.cpp
parentAdded a new param to OnPlayerEditingBook and changed the names (diff)
downloadcuberite-a5bae9f2f37921bfcf6203282155a8779c818120.tar
cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.tar.gz
cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.tar.bz2
cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.tar.lz
cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.tar.xz
cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.tar.zst
cuberite-a5bae9f2f37921bfcf6203282155a8779c818120.zip
Diffstat (limited to 'src/Item.cpp')
-rw-r--r--src/Item.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Item.cpp b/src/Item.cpp
index 412c66ec3..09f8f39d7 100644
--- a/src/Item.cpp
+++ b/src/Item.cpp
@@ -258,6 +258,10 @@ void cItem::FromJson(const Json::Value & a_Value)
{
m_BookContent.SetAuthor(a_Value.get("author", "").asString());
m_BookContent.SetTitle(a_Value.get("title", "").asString());
+ if (m_ItemType == E_ITEM_WRITTEN_BOOK)
+ {
+ m_BookContent.SetIsSigned(true);
+ }
if (a_Value.isMember("pages"))
{
for (Json::Value::ArrayIndex i = 0; i != a_Value["pages"].size(); i++)