summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorSimon Pribylski <66266021+Persson-dev@users.noreply.github.com>2022-01-24 21:24:55 +0100
committerGitHub <noreply@github.com>2022-01-24 21:24:55 +0100
commitf4c04299961a96e153bf50e2e1fb92c8f9db77f5 (patch)
treedf60ba3390281971920c1a1a2baf3a2f91ab55e9 /src/ClientHandle.cpp
parentAdd aarch64 to easyinstall. Fixes #5386 (diff)
downloadcuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.tar
cuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.tar.gz
cuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.tar.bz2
cuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.tar.lz
cuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.tar.xz
cuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.tar.zst
cuberite-f4c04299961a96e153bf50e2e1fb92c8f9db77f5.zip
Diffstat (limited to 'src/ClientHandle.cpp')
-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();