diff options
author | daniel0916 <theschokolps@gmail.com> | 2014-04-07 20:12:17 +0200 |
---|---|---|
committer | daniel0916 <theschokolps@gmail.com> | 2014-04-07 20:12:17 +0200 |
commit | 2e9754ac1cf0537c12ab7974cf55c451c0724540 (patch) | |
tree | 713c5b8c8f22f77893b30b9c8cefca4a7c491483 /MCServer/Plugins/MagicCarpet | |
parent | Fixed merge conflict (diff) | |
parent | Fixed some more minor issues with the redstone simulator. (diff) | |
download | cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.gz cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.bz2 cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.lz cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.xz cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.zst cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.zip |
Diffstat (limited to 'MCServer/Plugins/MagicCarpet')
-rw-r--r-- | MCServer/Plugins/MagicCarpet/coremessaging.lua | 19 | ||||
-rw-r--r-- | MCServer/Plugins/MagicCarpet/plugin.lua | 8 |
2 files changed, 4 insertions, 23 deletions
diff --git a/MCServer/Plugins/MagicCarpet/coremessaging.lua b/MCServer/Plugins/MagicCarpet/coremessaging.lua deleted file mode 100644 index 9fb2c0db1..000000000 --- a/MCServer/Plugins/MagicCarpet/coremessaging.lua +++ /dev/null @@ -1,19 +0,0 @@ -Core = cPluginManager:Get():GetPlugin("Core") - -function SendMessage(a_Player, a_Message) - if (Core ~= nil) then - Core:Call("SendMessage", a_Player, a_Message) - end -end - -function SendMessageSuccess(a_Player, a_Message) - if (Core ~= nil) then - Core:Call("SendMessageSuccess", a_Player, a_Message) - end -end - -function SendMessageFailure(a_Player, a_Message) - if (Core ~= nil) then - Core:Call("SendMessageFailure", a_Player, a_Message) - end -end diff --git a/MCServer/Plugins/MagicCarpet/plugin.lua b/MCServer/Plugins/MagicCarpet/plugin.lua index b05816e48..417ea0e02 100644 --- a/MCServer/Plugins/MagicCarpet/plugin.lua +++ b/MCServer/Plugins/MagicCarpet/plugin.lua @@ -6,7 +6,7 @@ function Initialize( Plugin ) Plugin:SetVersion( 2 ) cPluginManager.AddHook(cPluginManager.HOOK_PLAYER_MOVING, OnPlayerMoving) - cPluginManager.AddHook(cPluginManager.HOOK_DISCONNECT, OnDisconnect) + cPluginManager.AddHook(cPluginManager.HOOK_PLAYER_DESTROYED, OnDisconnect) local PluginManager = cPluginManager:Get() PluginManager:BindCommand("/mc", "magiccarpet", HandleCarpetCommand, " - Spawns a magical carpet"); @@ -37,12 +37,12 @@ function HandleCarpetCommand( Split, Player ) if( Carpet == nil ) then Carpets[ Player ] = cCarpet:new() - SendMessageSuccess(Player, "You're on a magic carpet!") - SendMessage(Player, "Look straight down to descend. Jump to ascend.") + Player:SendMessageSuccess("You're on a magic carpet!") + Player:SendMessageInfo("Look straight down to descend. Jump to ascend.") else Carpet:remove() Carpets[ Player ] = nil - SendMessageSuccess(Player, "The carpet vanished!") + Player:SendMessageSuccess("The carpet vanished!") end return true |