diff options
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r-- | src/ClientHandle.cpp | 5 |
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()) |