summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Core/regen.lua
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-07-27 17:24:03 +0200
committerAlexander Harkness <bearbin@gmail.com>2013-07-27 17:24:03 +0200
commit983d87e44356c4cfc8f8908ec365006323a4dbe0 (patch)
treeb035a1f68cf97fd3fbfbf5fed187d3f465835f3b /MCServer/Plugins/Core/regen.lua
parentRemoved extraneous core. (diff)
downloadcuberite-983d87e44356c4cfc8f8908ec365006323a4dbe0.tar
cuberite-983d87e44356c4cfc8f8908ec365006323a4dbe0.tar.gz
cuberite-983d87e44356c4cfc8f8908ec365006323a4dbe0.tar.bz2
cuberite-983d87e44356c4cfc8f8908ec365006323a4dbe0.tar.lz
cuberite-983d87e44356c4cfc8f8908ec365006323a4dbe0.tar.xz
cuberite-983d87e44356c4cfc8f8908ec365006323a4dbe0.tar.zst
cuberite-983d87e44356c4cfc8f8908ec365006323a4dbe0.zip
Diffstat (limited to 'MCServer/Plugins/Core/regen.lua')
-rw-r--r--MCServer/Plugins/Core/regen.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/MCServer/Plugins/Core/regen.lua b/MCServer/Plugins/Core/regen.lua
new file mode 100644
index 000000000..f1dd4e118
--- /dev/null
+++ b/MCServer/Plugins/Core/regen.lua
@@ -0,0 +1,18 @@
+function HandleRegenCommand(Split, Player)
+ if ((#Split == 2) or (#Split > 3)) then
+ Player:SendMessage( cChatColor.Green .. "Usage: '/regeneratechunk' or '/regeneratechunk [X] [Z]'");
+ return true;
+ end
+
+ local X = Player:GetChunkX();
+ local Z = Player:GetChunkZ();
+
+ if (#Split == 3) then
+ X = Split[2];
+ Z = Split[3];
+ end
+
+ Player:SendMessage(cChatColor.Green .. "Regenerating chunk ["..X..", "..Z.."]");
+ Player:GetWorld():RegenerateChunk(X, Z);
+ return true;
+end \ No newline at end of file