summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-11-18 20:00:04 +0100
committerMattes D <github@xoft.cz>2016-11-18 20:00:04 +0100
commit0bffa2935854d1b1d0110a33707650cafe084af7 (patch)
tree2e102088f7f8c1bb4b398de9043cf36c4e42767a /src/Entities/Player.cpp
parentUpdated the Core. (diff)
downloadcuberite-0bffa2935854d1b1d0110a33707650cafe084af7.tar
cuberite-0bffa2935854d1b1d0110a33707650cafe084af7.tar.gz
cuberite-0bffa2935854d1b1d0110a33707650cafe084af7.tar.bz2
cuberite-0bffa2935854d1b1d0110a33707650cafe084af7.tar.lz
cuberite-0bffa2935854d1b1d0110a33707650cafe084af7.tar.xz
cuberite-0bffa2935854d1b1d0110a33707650cafe084af7.tar.zst
cuberite-0bffa2935854d1b1d0110a33707650cafe084af7.zip
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp123
1 files changed, 121 insertions, 2 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 009f1e829..ce3b8b195 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1,10 +1,12 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
+#include <cmath>
+#include <unordered_map>
+
#include "Player.h"
#include "Mobs/Wolf.h"
#include "../BoundingBox.h"
-#include <unordered_map>
#include "../ChatColor.h"
#include "../Server.h"
#include "../UI/InventoryWindow.h"
@@ -18,7 +20,7 @@
#include "../Items/ItemHandler.h"
#include "../Vector3.h"
#include "../FastRandom.h"
-#include <cmath>
+#include "../ClientHandle.h"
#include "../WorldStorage/StatSerializer.h"
#include "../CompositeChat.h"
@@ -1354,6 +1356,123 @@ void cPlayer::CloseWindowIfID(char a_WindowID, bool a_CanRefuse)
+void cPlayer::SendMessage(const AString & a_Message)
+{
+ m_ClientHandle->SendChat(a_Message, mtCustom);
+}
+
+
+
+
+
+void cPlayer::SendMessageInfo(const AString & a_Message)
+{
+ m_ClientHandle->SendChat(a_Message, mtInformation);
+}
+
+
+
+
+
+void cPlayer::SendMessageFailure(const AString & a_Message)
+{
+ m_ClientHandle->SendChat(a_Message, mtFailure);
+}
+
+
+
+
+
+void cPlayer::SendMessageSuccess(const AString & a_Message)
+{
+ m_ClientHandle->SendChat(a_Message, mtSuccess);
+}
+
+
+
+
+
+void cPlayer::SendMessageWarning(const AString & a_Message)
+{
+ m_ClientHandle->SendChat(a_Message, mtWarning);
+}
+
+
+
+
+
+void cPlayer::SendMessageFatal(const AString & a_Message)
+{
+ m_ClientHandle->SendChat(a_Message, mtFailure);
+}
+
+
+
+
+
+void cPlayer::SendMessagePrivateMsg(const AString & a_Message, const AString & a_Sender)
+{
+ m_ClientHandle->SendChat(a_Message, mtPrivateMessage, a_Sender);
+}
+
+
+
+
+
+void cPlayer::SendMessage(const cCompositeChat & a_Message)
+{
+ m_ClientHandle->SendChat(a_Message);
+}
+
+
+
+
+
+void cPlayer::SendMessageRaw(const AString & a_MessageRaw, eChatType a_Type)
+{
+ m_ClientHandle->SendChatRaw(a_MessageRaw, a_Type);
+}
+
+
+
+
+
+void cPlayer::SendSystemMessage(const AString & a_Message)
+{
+ m_ClientHandle->SendChatSystem(a_Message, mtCustom);
+}
+
+
+
+
+
+void cPlayer::SendAboveActionBarMessage(const AString & a_Message)
+{
+ m_ClientHandle->SendChatAboveActionBar(a_Message, mtCustom);
+}
+
+
+
+
+
+void cPlayer::SendSystemMessage(const cCompositeChat & a_Message)
+{
+ m_ClientHandle->SendChatSystem(a_Message);
+}
+
+
+
+
+
+void cPlayer::SendAboveActionBarMessage(const cCompositeChat & a_Message)
+{
+ m_ClientHandle->SendChatAboveActionBar(a_Message);
+}
+
+
+
+
+
void cPlayer::SetGameMode(eGameMode a_GameMode)
{
if ((a_GameMode < gmMin) || (a_GameMode >= gmMax))