summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Debuggers
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-23 19:41:01 +0200
committerMattes D <github@xoft.cz>2015-04-23 19:41:01 +0200
commit08624348f4e84fdc9909eb5de4478443bad8cc8d (patch)
tree26083482d28734594ba7e5c28af887224e9f12b9 /MCServer/Plugins/Debuggers
parentMerge pull request #1883 from mc-server/NarrowWindowID (diff)
downloadcuberite-08624348f4e84fdc9909eb5de4478443bad8cc8d.tar
cuberite-08624348f4e84fdc9909eb5de4478443bad8cc8d.tar.gz
cuberite-08624348f4e84fdc9909eb5de4478443bad8cc8d.tar.bz2
cuberite-08624348f4e84fdc9909eb5de4478443bad8cc8d.tar.lz
cuberite-08624348f4e84fdc9909eb5de4478443bad8cc8d.tar.xz
cuberite-08624348f4e84fdc9909eb5de4478443bad8cc8d.tar.zst
cuberite-08624348f4e84fdc9909eb5de4478443bad8cc8d.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 01a5de81e..6580e9dbc 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -62,6 +62,7 @@ function Initialize(a_Plugin)
-- TestRankMgr()
TestFileExt()
TestFileLastMod()
+ TestPluginInterface()
local LastSelfMod = cFile:GetLastModificationTime(a_Plugin:GetLocalFolder() .. "/Debuggers.lua")
LOG("Debuggers.lua last modified on " .. os.date("%Y-%m-%dT%H:%M:%S", LastSelfMod))
@@ -75,6 +76,18 @@ function Initialize(a_Plugin)
)
--]]
+ -- Test the crash in #1889:
+ cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_RIGHT_CLICKING_ENTITY,
+ function (a_CBPlayer, a_CBEntity)
+ a_CBPlayer:GetWorld():DoWithEntityByID( -- This will crash the server in #1889
+ a_CBEntity:GetUniqueID(),
+ function(Entity)
+ LOG("RightClicking an entity, crash #1889 fixed")
+ end
+ )
+ end
+ )
+
return true
end;
@@ -82,6 +95,27 @@ end;
+function TestPluginInterface()
+ cPluginManager:DoWithPlugin("Core",
+ function (a_CBPlugin)
+ if (a_CBPlugin:GetStatus() == cPluginManager.psLoaded) then
+ LOG("Core plugin was found, version " .. a_CBPlugin:GetVersion())
+ else
+ LOG("Core plugin is not loaded")
+ end
+ end
+ )
+
+ cPluginManager:ForEachPlugin(
+ function (a_CBPlugin)
+ LOG("Plugin in " .. a_CBPlugin:GetFolderName() .. " has an API name of " .. a_CBPlugin:GetName() .. " and status " .. a_CBPlugin:GetStatus())
+ end
+ )
+end
+
+
+
+
function TestFileExt()
assert(cFile:ChangeFileExt("fileless_dir/", "new") == "fileless_dir/")
assert(cFile:ChangeFileExt("fileless_dir/", ".new") == "fileless_dir/")