summaryrefslogtreecommitdiffstats
path: root/src/CompositeChat.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-09-27 19:40:00 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-09-27 19:40:00 +0200
commitd1814d2d67cdaa4fbcbd10a1af290412c29441af (patch)
treeeb132621bef87b82311f70ead69694c4c88690c9 /src/CompositeChat.h
parente.t.c. -> etc. (diff)
parentMerge pull request #1461 from mc-server/RedstoneFix (diff)
downloadcuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.tar
cuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.tar.gz
cuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.tar.bz2
cuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.tar.lz
cuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.tar.xz
cuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.tar.zst
cuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.zip
Diffstat (limited to 'src/CompositeChat.h')
-rw-r--r--src/CompositeChat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/CompositeChat.h b/src/CompositeChat.h
index 2dc21b98f..369eed196 100644
--- a/src/CompositeChat.h
+++ b/src/CompositeChat.h
@@ -4,6 +4,7 @@
// Declares the cCompositeChat class used to wrap a chat message with multiple parts (text, url, cmd)
#include "Defines.h"
+#include "json/json.h"
@@ -189,6 +190,8 @@ public:
Used for older protocols that don't support composite chat
and for console-logging. */
AString ExtractText(void) const;
+
+ AString CreateJsonString(bool a_ShouldUseChatPrefixes = true) const;
// tolua_end
@@ -197,6 +200,9 @@ public:
/** Converts the MessageType to a LogLevel value.
Used by the logging bindings when logging a cCompositeChat object. */
static cLogger::eLogLevel MessageTypeToLogLevel(eMessageType a_MessageType);
+
+ /** Adds the chat part's style (represented by the part's stylestring) into the Json object. */
+ void AddChatPartStyle(Json::Value & a_Value, const AString & a_PartStyle) const;
protected:
/** All the parts that */