summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Debuggers
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-08-29 15:56:40 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-08-29 15:56:40 +0200
commit431b7ed0b7764db732e39802a40d94dfe9f2108b (patch)
treef3f5ab4a7b1f2838733004d8294e571b777e631f /MCServer/Plugins/Debuggers
parentAdded new console command with cleanup (diff)
parentVanillaFluidSimulator: Fixed an invalid Y-coord query. (diff)
downloadcuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.tar
cuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.tar.gz
cuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.tar.bz2
cuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.tar.lz
cuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.tar.xz
cuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.tar.zst
cuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.zip
Diffstat (limited to 'MCServer/Plugins/Debuggers')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua28
1 files changed, 27 insertions, 1 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 7e220952e..179935c08 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -33,6 +33,7 @@ function Initialize(Plugin)
PM:AddHook(cPluginManager.HOOK_PROJECTILE_HIT_BLOCK, OnProjectileHitBlock);
PM:AddHook(cPluginManager.HOOK_CHUNK_UNLOADING, OnChunkUnloading);
PM:AddHook(cPluginManager.HOOK_WORLD_STARTED, OnWorldStarted);
+ PM:AddHook(cPluginManager.HOOK_PROJECTILE_HIT_BLOCK, OnProjectileHitBlock);
-- _X: Disabled so that the normal operation doesn't interfere with anything
-- PM:AddHook(cPluginManager.HOOK_CHUNK_GENERATED, OnChunkGenerated);
@@ -80,7 +81,8 @@ function Initialize(Plugin)
TestBlockAreasString()
TestStringBase64()
- TestUUIDFromName()
+ -- TestUUIDFromName()
+ -- TestRankMgr()
--[[
-- Test cCompositeChat usage in console-logging:
@@ -352,6 +354,18 @@ end
+function TestRankMgr()
+ LOG("Testing the rank manager")
+ cRankManager:AddRank("LuaRank")
+ cRankManager:AddGroup("LuaTestGroup")
+ cRankManager:AddGroupToRank("LuaTestGroup", "LuaRank")
+ cRankManager:AddPermissionToGroup("luaperm", "LuaTestGroup")
+end
+
+
+
+
+
function TestSQLiteBindings()
LOG("Testing SQLite bindings...");
@@ -1532,3 +1546,15 @@ end
+
+function OnProjectileHitBlock(a_ProjectileEntity, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_BlockHitPos)
+ -- This simple test is for testing issue #1326 - simply declaring this hook would crash the server upon call
+ LOG("Projectile hit block")
+ LOG(" Projectile EntityID: " .. a_ProjectileEntity:GetUniqueID())
+ LOG(" Block: {" .. a_BlockX .. ", " .. a_BlockY .. ", " .. a_BlockZ .. "}, face " .. a_BlockFace)
+ LOG(" HitPos: {" .. a_BlockHitPos.x .. ", " .. a_BlockHitPos.y .. ", " .. a_BlockHitPos.z .. "}")
+end
+
+
+
+