diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-09-25 16:22:08 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-09-25 16:22:08 +0200 |
commit | 9c459cbe50dd7c7c327d712369b523dd018575bf (patch) | |
tree | 9dea40b71ffdca0dccf31fa1f005e279d822fa46 /src/CompositeChat.h | |
parent | Fix accedental c++11 (diff) | |
parent | Merge pull request #1449 from mc-server/WorldLoader (diff) | |
download | cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.gz cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.bz2 cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.lz cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.xz cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.zst cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.zip |
Diffstat (limited to 'src/CompositeChat.h')
-rw-r--r-- | src/CompositeChat.h | 6 |
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 */ |