summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Debuggers/Debuggers.lua
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-02 08:44:06 +0200
committermadmaxoft <github@xoft.cz>2013-08-02 08:44:06 +0200
commit3531bdb60b858a232f23bb8651b75afcd79e57e5 (patch)
treef4e5557421b2320a6ec817af967aab37e6fe0bbc /MCServer/Plugins/Debuggers/Debuggers.lua
parentNew players get full health (diff)
downloadcuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.tar
cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.tar.gz
cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.tar.bz2
cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.tar.lz
cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.tar.xz
cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.tar.zst
cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index ab3397f74..f26b9a98d 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -21,7 +21,8 @@ function Initialize(Plugin)
PluginManager:AddHook(Plugin, cPluginManager.HOOK_TAKE_DAMAGE);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_TICK);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHAT);
-
+ PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_RIGHT_CLICKING_ENTITY);
+
PluginManager:BindCommand("/le", "debuggers", HandleListEntitiesCmd, "Shows a list of all the loaded entities");
PluginManager:BindCommand("/ke", "debuggers", HandleKillEntitiesCmd, "Kills all the loaded entities");
PluginManager:BindCommand("/wool", "debuggers", HandleWoolCmd, "Sets all your armor to blue wool");
@@ -484,6 +485,15 @@ end
+function OnPlayerRightClickingEntity(a_Player, a_Entity)
+ LOG("Player " .. a_Player:GetName() .. " right-clicking entity ID " .. a_Entity:GetUniqueID() .. ", a " .. a_Entity:GetClass());
+ return false;
+end
+
+
+
+
+
-- Function "round" copied from http://lua-users.org/wiki/SimpleRound
function round(num, idp)
local mult = 10^(idp or 0)