summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Core/regen.lua
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-08-11 17:00:53 +0200
committerAlexander Harkness <bearbin@gmail.com>2013-08-11 17:00:53 +0200
commitcc708f757c19a2e0c66f138897f41d86d46dd0fb (patch)
tree768cee0a544f131cf6964c058ec2881346880804 /MCServer/Plugins/Core/regen.lua
parentAdded the OnHopperPullingItem and OnHopperPushingItem hooks. (diff)
downloadcuberite-cc708f757c19a2e0c66f138897f41d86d46dd0fb.tar
cuberite-cc708f757c19a2e0c66f138897f41d86d46dd0fb.tar.gz
cuberite-cc708f757c19a2e0c66f138897f41d86d46dd0fb.tar.bz2
cuberite-cc708f757c19a2e0c66f138897f41d86d46dd0fb.tar.lz
cuberite-cc708f757c19a2e0c66f138897f41d86d46dd0fb.tar.xz
cuberite-cc708f757c19a2e0c66f138897f41d86d46dd0fb.tar.zst
cuberite-cc708f757c19a2e0c66f138897f41d86d46dd0fb.zip
Diffstat (limited to 'MCServer/Plugins/Core/regen.lua')
-rw-r--r--MCServer/Plugins/Core/regen.lua32
1 files changed, 17 insertions, 15 deletions
diff --git a/MCServer/Plugins/Core/regen.lua b/MCServer/Plugins/Core/regen.lua
index 176396734..e76f5cb5c 100644
--- a/MCServer/Plugins/Core/regen.lua
+++ b/MCServer/Plugins/Core/regen.lua
@@ -1,18 +1,20 @@
function HandleRegenCommand(Split, Player)
- if ((#Split == 2) or (#Split > 3)) then
- Player:SendMessage(cChatColor.Yellow .. "[INFO] " .. cChatColor.White .. "Usage: '/regeneratechunk' or '/regeneratechunk [X] [Z]'");
- return true;
+
+ if #Split == 2 or #Split > 3 then
+ SendMessage( Player, "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];
+
+ local X = Player:GetChunkX()
+ local Z = Player:GetChunkZ()
+
+ if #Split == 3 then
+ X = Split[2]
+ Z = Split[3]
end
-
- Player:SendMessage(cChatColor.Green .. "[INFO] " .. cChatColor.White .. "Regenerating chunk ["..X..", "..Z.."]");
- Player:GetWorld():RegenerateChunk(X, Z);
- return true;
-end \ No newline at end of file
+
+ SendMessageSuccess( Player, "Regenerating chunk ["..X..", "..Z.."]")
+ Player:GetWorld():RegenerateChunk(X, Z)
+ return true
+
+end