diff options
Diffstat (limited to 'MCServer/Plugins/Core/regen.lua')
-rw-r--r-- | MCServer/Plugins/Core/regen.lua | 32 |
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 |