diff options
author | Mattes D <github@xoft.cz> | 2021-07-20 20:48:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-20 20:48:05 +0200 |
commit | 179d6da490636799fd765298c9e3d884d9d980a1 (patch) | |
tree | 73f8bce9a3d8f42aa5364c25abadc566f27892e5 /src/ClientHandle.cpp | |
parent | Update README.md (#5262) (diff) | |
download | cuberite-179d6da490636799fd765298c9e3d884d9d980a1.tar cuberite-179d6da490636799fd765298c9e3d884d9d980a1.tar.gz cuberite-179d6da490636799fd765298c9e3d884d9d980a1.tar.bz2 cuberite-179d6da490636799fd765298c9e3d884d9d980a1.tar.lz cuberite-179d6da490636799fd765298c9e3d884d9d980a1.tar.xz cuberite-179d6da490636799fd765298c9e3d884d9d980a1.tar.zst cuberite-179d6da490636799fd765298c9e3d884d9d980a1.zip |
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()) |