diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-02-10 21:13:22 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-02-10 21:13:22 +0100 |
commit | 0cf1c1d91d97efeb968382bc95b3a8e9a836496f (patch) | |
tree | a6bfe19d8e3afcc3657a239f2857ff24e1dcb7ad /MCServer/Plugins/MagicCarpet/plugin.lua | |
parent | Merge branch 'master' into playerimprovements (diff) | |
download | cuberite-0cf1c1d91d97efeb968382bc95b3a8e9a836496f.tar cuberite-0cf1c1d91d97efeb968382bc95b3a8e9a836496f.tar.gz cuberite-0cf1c1d91d97efeb968382bc95b3a8e9a836496f.tar.bz2 cuberite-0cf1c1d91d97efeb968382bc95b3a8e9a836496f.tar.lz cuberite-0cf1c1d91d97efeb968382bc95b3a8e9a836496f.tar.xz cuberite-0cf1c1d91d97efeb968382bc95b3a8e9a836496f.tar.zst cuberite-0cf1c1d91d97efeb968382bc95b3a8e9a836496f.zip |
Diffstat (limited to 'MCServer/Plugins/MagicCarpet/plugin.lua')
-rw-r--r-- | MCServer/Plugins/MagicCarpet/plugin.lua | 8 |
1 files changed, 4 insertions, 4 deletions
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 |