summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-19 12:03:34 +0200
committermadmaxoft <github@xoft.cz>2013-08-19 12:03:34 +0200
commit0575cc00b4c40e62268bdb2c76c11e8d914d180b (patch)
tree17cb566db4016a08b30ef2ad95680aa3d424c757 /MCServer/Plugins
parentAdded cPickup:IsCollected() to the Lua API. (diff)
downloadcuberite-0575cc00b4c40e62268bdb2c76c11e8d914d180b.tar
cuberite-0575cc00b4c40e62268bdb2c76c11e8d914d180b.tar.gz
cuberite-0575cc00b4c40e62268bdb2c76c11e8d914d180b.tar.bz2
cuberite-0575cc00b4c40e62268bdb2c76c11e8d914d180b.tar.lz
cuberite-0575cc00b4c40e62268bdb2c76c11e8d914d180b.tar.xz
cuberite-0575cc00b4c40e62268bdb2c76c11e8d914d180b.tar.zst
cuberite-0575cc00b4c40e62268bdb2c76c11e8d914d180b.zip
Diffstat (limited to 'MCServer/Plugins')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 2041b17ee..d74b4ea69 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -515,7 +515,13 @@ function HandleListEntitiesCmd(Split, Player)
-- The entity has already been destroyed, don't list it
return false;
end;
- Player:SendMessage(" " .. Entity:GetUniqueID() .. ": " .. Entity:GetClass() .. " {" .. round(Entity:GetPosX(), 2) .. ", " .. round(Entity:GetPosY(), 2) .. ", " .. round(Entity:GetPosZ(), 2) .."}");
+ local cls = Entity:GetClass();
+ Player:SendMessage(" " .. Entity:GetUniqueID() .. ": " .. cls .. " {" .. round(Entity:GetPosX(), 2) .. ", " .. round(Entity:GetPosY(), 2) .. ", " .. round(Entity:GetPosZ(), 2) .."}");
+ if (cls == "cPickup") then
+ local Pickup = Entity;
+ tolua.cast(Pickup, "cPickup");
+ Player:SendMessage(" Age: " .. Pickup:GetAge() .. ", IsCollected: " .. tostring(Pickup:IsCollected()));
+ end
NumEntities = NumEntities + 1;
end