|
Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
|
Click Event. More...
#include <chatmessage.h>
Public Types | |
| enum | ActionType { NONE , OPEN_URL , RUN_COMMAND , SUGGEST_COMMAND , CHANGE_PAGE , COPY_TO_CLIPBOARD } |
| Type of action to perform. More... | |
Public Member Functions | |
| ClickEvent (ActionType action, std::string value) | |
| Construct a new Click Event object. | |
| ClickEvent (std::uint32_t changePage) | |
| Construct a new Click Event object. | |
| ClickEvent () | |
| Construct a new Click Event object. | |
| ~ClickEvent ()=default | |
| Destroy the Click Event object. | |
| void | load (const rapidjson::Value &document) |
| Load click event from JSON. | |
| void | save (rapidjson::Value &document, rapidjson::Document::AllocatorType &alloc) const |
| Save click event to JSON. | |
Static Public Member Functions | |
| static void | loadLua (lua_State *state, const char *namespaceName) |
| Loads Click Event to lua. | |
Public Attributes | |
| ActionType | action |
| Action to perform. | |
| std::string | value |
| Value of action. | |
Click Event.
On message click event
| ChatMessage::ClickEvent::ClickEvent | ( | ActionType | action, |
| std::string | value ) |
Construct a new Click Event object.
| action | the action type |
| value | the value of action |
| ChatMessage::ClickEvent::ClickEvent | ( | std::uint32_t | changePage | ) |
Construct a new Click Event object.
| changePage | see ActionType::CHANGE_PAGE |
Load click event from JSON.
| document | the document to load from |
Loads Click Event to lua.
| state | the state of lua |
| namespaceName | the namespace name |
| void ChatMessage::ClickEvent::save | ( | rapidjson::Value & | document, |
| rapidjson::Document::AllocatorType & | alloc ) const |
Save click event to JSON.
| document | the document to save to |
| alloc | the document allocator |