summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-04-10 14:32:39 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-04-10 14:32:39 +0200
commit23cfcc6ffd8815a788992974d0f7e4c0824f8729 (patch)
tree25942aec51557754182bf6d0bbf65faee67ed38d
parentAdded the "/regeneratechunk" command that regenerates either current chunk or a chunk specified with x, z parameters. TODO: permissions - we don't want guests erasing our chunks! (diff)
downloadcuberite-23cfcc6ffd8815a788992974d0f7e4c0824f8729.tar
cuberite-23cfcc6ffd8815a788992974d0f7e4c0824f8729.tar.gz
cuberite-23cfcc6ffd8815a788992974d0f7e4c0824f8729.tar.bz2
cuberite-23cfcc6ffd8815a788992974d0f7e4c0824f8729.tar.lz
cuberite-23cfcc6ffd8815a788992974d0f7e4c0824f8729.tar.xz
cuberite-23cfcc6ffd8815a788992974d0f7e4c0824f8729.tar.zst
cuberite-23cfcc6ffd8815a788992974d0f7e4c0824f8729.zip
Diffstat (limited to '')
-rw-r--r--source/cServer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/cServer.cpp b/source/cServer.cpp
index eff4e9fc0..d8e3506dc 100644
--- a/source/cServer.cpp
+++ b/source/cServer.cpp
@@ -495,6 +495,11 @@ bool cServer::Command( cClientHandle & a_Client, const char* a_Cmd )
if (split[0].compare("/regeneratechunk") == 0)
{
+ if (!a_Client.GetPlayer()->HasPermission("builtin.regeneratechunk"))
+ {
+ a_Client.Send(cPacket_Chat(cChatColor::Green + "You don't have permissions to regenerate chunks"));
+ return true;
+ }
int ChunkX, ChunkZ;
if (split.size() == 1)
{