summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index c2135777b..cd7de10dc 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -459,6 +459,10 @@ void cClientHandle::FinishAuthenticate()
// Return a server login packet:
m_Protocol->SendLogin(*m_Player, *World);
+ // Send the player's permission level.
+ // The key effect is to allow 1.9+ clients to open the command block UI.
+ SendPlayerPermissionLevel();
+
if (m_Player->GetKnownRecipes().empty())
{
SendInitRecipes(0);
@@ -1042,7 +1046,7 @@ void cClientHandle::HandleCommandBlockBlockChange(int a_BlockX, int a_BlockY, in
return;
}
- if ((m_Player == nullptr) || !m_Player->HasPermission("comandblock.set"))
+ if ((m_Player == nullptr) || !m_Player->HasPermission("cuberite.commandblock.set"))
{
SendChat("You cannot edit command blocks on this server", mtFailure);
return;
@@ -1589,7 +1593,7 @@ void cClientHandle::HandleChat(const AString & a_Message)
Msg.AddTextPart(m_Player->GetName(), Color);
Msg.ParseText(m_Player->GetSuffix());
Msg.AddTextPart("> ");
- if (m_Player->HasPermission("chat.format"))
+ if (m_Player->HasPermission("cuberite.chat.format"))
{
Msg.ParseText(Message);
}
@@ -2880,6 +2884,15 @@ void cClientHandle::SendPlayerMoveLook(void)
+void cClientHandle::SendPlayerPermissionLevel()
+{
+ m_Protocol->SendPlayerPermissionLevel();
+}
+
+
+
+
+
void cClientHandle::SendPlayerPosition(void)
{
m_Protocol->SendPlayerPosition();