summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-31 17:32:08 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-31 17:32:08 +0100
commit7694a0788c796cb08539dcdc3ed4bf9eee3babbf (patch)
tree78873e56309a8eb45b47de6a2d775763568a5a4e /src/Items
parentfogot to add promise classes (diff)
parentMerge pull request #484 from worktycho/cmake-fixes (diff)
downloadcuberite-7694a0788c796cb08539dcdc3ed4bf9eee3babbf.tar
cuberite-7694a0788c796cb08539dcdc3ed4bf9eee3babbf.tar.gz
cuberite-7694a0788c796cb08539dcdc3ed4bf9eee3babbf.tar.bz2
cuberite-7694a0788c796cb08539dcdc3ed4bf9eee3babbf.tar.lz
cuberite-7694a0788c796cb08539dcdc3ed4bf9eee3babbf.tar.xz
cuberite-7694a0788c796cb08539dcdc3ed4bf9eee3babbf.tar.zst
cuberite-7694a0788c796cb08539dcdc3ed4bf9eee3babbf.zip
Diffstat (limited to 'src/Items')
-rw-r--r--src/Items/ItemFishingRod.h8
1 files changed, 7 insertions, 1 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