summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-12 10:04:16 +0100
committermadmaxoft <github@xoft.cz>2014-01-12 10:04:16 +0100
commit180b9b90993870532a8daa2ee6498005b6c3bf49 (patch)
treedac846b760b6f5fd294fbd771975dd55b0856c0d /src/Items
parentFixed Linux configuration. (diff)
parentDisabled a useless MSVC warning in Bindings.cpp. (diff)
downloadcuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.tar
cuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.tar.gz
cuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.tar.bz2
cuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.tar.lz
cuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.tar.xz
cuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.tar.zst
cuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.zip
Diffstat (limited to '')
-rw-r--r--src/Items/ItemFishingRod.h8
-rw-r--r--src/Items/ItemHandler.h8
-rw-r--r--src/Items/ItemSeeds.h1
3 files changed, 14 insertions, 3 deletions
diff --git a/src/Items/ItemFishingRod.h b/src/Items/ItemFishingRod.h
index 941ce3b71..b2eaee63a 100644
--- a/src/Items/ItemFishingRod.h
+++ b/src/Items/ItemFishingRod.h
@@ -9,9 +9,11 @@
#pragma once
+#include "../Bindings/PluginManager.h"
#include "../Entities/Floater.h"
#include "../Entities/Entity.h"
#include "../Item.h"
+#include "../Root.h"
@@ -210,10 +212,14 @@ public:
}
}
-
+ if (cRoot::Get()->GetPluginManager()->CallHookPlayerFishing(*a_Player, Drops))
+ {
+ return true;
+ }
Vector3d FloaterPos = FloaterInfo.GetPos();
Vector3d FlyDirection = a_Player->GetEyePosition() - FloaterPos;
a_World->SpawnItemPickups(Drops, FloaterPos.x, FloaterPos.y, FloaterPos.z, FlyDirection.x, FlyDirection.y + 1, FlyDirection.z);
+ cRoot::Get()->GetPluginManager()->CallHookPlayerFished(*a_Player, Drops);
}
}
else
diff --git a/src/Items/ItemHandler.h b/src/Items/ItemHandler.h
index e39bb054b..db0ffc9db 100644
--- a/src/Items/ItemHandler.h
+++ b/src/Items/ItemHandler.h
@@ -25,7 +25,13 @@ public:
virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir);
/// Called when the client sends the SHOOT status in the lclk packet
- virtual void OnItemShoot(cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace) {}
+ virtual void OnItemShoot(cPlayer *, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace)
+ {
+ UNUSED(a_BlockX);
+ UNUSED(a_BlockY);
+ UNUSED(a_BlockZ);
+ UNUSED(a_BlockFace);
+ }
/// Called while the player diggs a block using this item
virtual bool OnDiggingBlock(cWorld * a_World, cPlayer * a_Player, const cItem & a_HeldItem, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace);
diff --git a/src/Items/ItemSeeds.h b/src/Items/ItemSeeds.h
index 8ca86663f..67f0d38bd 100644
--- a/src/Items/ItemSeeds.h
+++ b/src/Items/ItemSeeds.h
@@ -56,7 +56,6 @@ public:
case E_ITEM_SEEDS: a_BlockType = E_BLOCK_CROPS; return true;
default: a_BlockType = E_BLOCK_AIR; return true;
}
- return false;
}
} ;