diff options
author | madmaxoft <github@xoft.cz> | 2014-03-04 22:17:47 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-03-04 22:17:47 +0100 |
commit | ab30d94b2fed330bb487e30960d82c0bedff37b4 (patch) | |
tree | df54a0de58534d1be8e9261f91ba60e97503ad6b /MCServer/Plugins/Debuggers | |
parent | Manually exported cCompositeChat modifiers. (diff) | |
download | cuberite-ab30d94b2fed330bb487e30960d82c0bedff37b4.tar cuberite-ab30d94b2fed330bb487e30960d82c0bedff37b4.tar.gz cuberite-ab30d94b2fed330bb487e30960d82c0bedff37b4.tar.bz2 cuberite-ab30d94b2fed330bb487e30960d82c0bedff37b4.tar.lz cuberite-ab30d94b2fed330bb487e30960d82c0bedff37b4.tar.xz cuberite-ab30d94b2fed330bb487e30960d82c0bedff37b4.tar.zst cuberite-ab30d94b2fed330bb487e30960d82c0bedff37b4.zip |
Diffstat (limited to 'MCServer/Plugins/Debuggers')
-rw-r--r-- | MCServer/Plugins/Debuggers/Debuggers.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index 66894d835..329a652cd 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -30,6 +30,7 @@ function Initialize(Plugin) PM:AddHook(cPluginManager.HOOK_CHUNK_GENERATED, OnChunkGenerated); PM:AddHook(cPluginManager.HOOK_PLUGINS_LOADED, OnPluginsLoaded); PM:AddHook(cPluginManager.HOOK_PLUGIN_MESSAGE, OnPluginMessage); + PM:AddHook(cPluginManager.HOOK_PLAYER_JOINED, OnPlayerJoined) PM:BindCommand("/le", "debuggers", HandleListEntitiesCmd, "- Shows a list of all the loaded entities"); PM:BindCommand("/ke", "debuggers", HandleKillEntitiesCmd, "- Kills all the loaded entities"); @@ -1258,3 +1259,17 @@ end + +function OnPlayerJoined(a_Player) + -- Test composite chat chaining: + a_Player:SendMessage(cCompositeChat() + :AddTextPart("Hello, ") + :AddUrlPart(a_Player:GetName(), "www.mc-server.org", "u@2") + :AddSuggestCommandPart(", and welcome.", "/help", "u") + :AddRunCommandPart(" SetDay", "/time set 0") + ) +end + + + + |