summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Debuggers
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-02-11 08:54:29 +0100
committermadmaxoft <github@xoft.cz>2014-02-11 08:54:29 +0100
commit90d68c57e43773587fb8b2cd9f073806e2828f78 (patch)
tree0cacd6ad93e9d02c0228bc314834bd7e8edae1bc /MCServer/Plugins/Debuggers
parentFixed nested plugin function calls. (diff)
downloadcuberite-90d68c57e43773587fb8b2cd9f073806e2828f78.tar
cuberite-90d68c57e43773587fb8b2cd9f073806e2828f78.tar.gz
cuberite-90d68c57e43773587fb8b2cd9f073806e2828f78.tar.bz2
cuberite-90d68c57e43773587fb8b2cd9f073806e2828f78.tar.lz
cuberite-90d68c57e43773587fb8b2cd9f073806e2828f78.tar.xz
cuberite-90d68c57e43773587fb8b2cd9f073806e2828f78.tar.zst
cuberite-90d68c57e43773587fb8b2cd9f073806e2828f78.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua13
1 files changed, 9 insertions, 4 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 853b0a1dc..8345e2169 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -1064,20 +1064,25 @@ end
function HandleChunkStay(a_Split, a_Player)
+ -- As an example of using ChunkStay, this call will load 3x3 chunks around the specified chunk coords,
+ -- then build an obsidian pillar in the middle of each one.
+ -- Once complete, the player will be teleported to the middle pillar
+
if (#a_Split ~= 3) then
- a_Player:SendMessage("Usage: /cs <ChunkX> <ChunkZ>")
+ a_Player:SendMessageInfo("Usage: /cs <ChunkX> <ChunkZ>")
return true
end
local ChunkX = tonumber(a_Split[2])
local ChunkZ = tonumber(a_Split[3])
if ((ChunkX == nil) or (ChunkZ == nil)) then
- a_Player:SendMessage("Invalid chunk coords.")
+ a_Player:SendMessageFailure("Invalid chunk coords.")
return true
end
local World = a_Player:GetWorld()
local PlayerID = a_Player:GetUniqueID()
+ a_Player:SendMessageInfo("Loading chunks, stand by...");
-- Set the wanted chunks:
local Chunks = {}
@@ -1103,7 +1108,7 @@ function HandleChunkStay(a_Split, a_Player)
World:DoWithEntityByID(PlayerID,
function (a_CallbackPlayer)
a_CallbackPlayer:TeleportToCoords(ChunkX * 16 + 8, 85, ChunkZ * 16 + 8)
- a_CallbackPlayer:SendMessage("ChunkStay fully available")
+ a_CallbackPlayer:SendMessageSuccess("ChunkStay fully available")
end
)
end
@@ -1114,7 +1119,7 @@ function HandleChunkStay(a_Split, a_Player)
LOGINFO("ChunkStay now has chunk [" .. a_ChunkX .. ", " .. a_ChunkZ .. "]")
World:DoWithEntityByID(PlayerID,
function (a_CallbackPlayer)
- a_CallbackPlayer:SendMessage("ChunkStay now has chunk [" .. a_ChunkX .. ", " .. a_ChunkZ .. "]")
+ a_CallbackPlayer:SendMessageInfo("ChunkStay now has chunk [" .. a_ChunkX .. ", " .. a_ChunkZ .. "]")
end
)
end