summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-02-11 08:50:30 +0100
committermadmaxoft <github@xoft.cz>2014-02-11 08:50:30 +0100
commit8a8997cc38a5719de7f1b30575f0aac54bbada95 (patch)
treea124575c730bbb2a9005b780069856336b9c1eb5
parentAPIDump: Documented cWorld:ChunkStay(). (diff)
parentMerge pull request #660 from worktycho/boatsFix (diff)
downloadcuberite-8a8997cc38a5719de7f1b30575f0aac54bbada95.tar
cuberite-8a8997cc38a5719de7f1b30575f0aac54bbada95.tar.gz
cuberite-8a8997cc38a5719de7f1b30575f0aac54bbada95.tar.bz2
cuberite-8a8997cc38a5719de7f1b30575f0aac54bbada95.tar.lz
cuberite-8a8997cc38a5719de7f1b30575f0aac54bbada95.tar.xz
cuberite-8a8997cc38a5719de7f1b30575f0aac54bbada95.tar.zst
cuberite-8a8997cc38a5719de7f1b30575f0aac54bbada95.zip
m---------MCServer/Plugins/Core0
-rw-r--r--MCServer/Plugins/MagicCarpet/coremessaging.lua19
-rw-r--r--MCServer/Plugins/MagicCarpet/plugin.lua8
-rw-r--r--src/Items/ItemBoat.h3
4 files changed, 5 insertions, 25 deletions
diff --git a/MCServer/Plugins/Core b/MCServer/Plugins/Core
-Subproject 7f97e93ef25616673e8342b7919d9b5914e1327
+Subproject 8ddc8a9d027a9471c72270ec82cc618069710fa
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
diff --git a/src/Items/ItemBoat.h b/src/Items/ItemBoat.h
index 31d1ca52e..a28ec8e22 100644
--- a/src/Items/ItemBoat.h
+++ b/src/Items/ItemBoat.h
@@ -1,4 +1,3 @@
-
// ItemBoat.h
// Declares the various boat ItemHandlers
@@ -31,7 +30,7 @@ public:
virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir) override
{
- if (a_Dir != BLOCK_FACE_YM || a_Dir != BLOCK_FACE_NONE)
+ if ((a_Dir != BLOCK_FACE_YM) && (a_Dir != BLOCK_FACE_NONE))
{
return false;
}