summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index e5f001116..d36f27d8c 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -940,6 +940,11 @@ void cClientHandle::HandleCommandBlockBlockChange(int a_BlockX, int a_BlockY, in
Kick("Command block string unexpectedly empty - hacked client?");
return;
}
+ if ((m_Player == nullptr) || !m_Player->HasPermission("comandblock.set"))
+ {
+ SendChat("You cannot edit command blocks on this server", mtFailure);
+ return;
+ }
cWorld * World = m_Player->GetWorld();
if (World->AreCommandBlocksEnabled())