summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-06-30 15:12:56 +0200
committerHowaner <franzi.moos@googlemail.com>2014-06-30 15:12:56 +0200
commitaa753a92c092a4d35b2ff7d08259c3196abecf67 (patch)
treebfc61dbfbc957110217460cb89d7be612ee1f944 /src/Bindings/PluginManager.cpp
parentUnnecessary return (diff)
downloadcuberite-aa753a92c092a4d35b2ff7d08259c3196abecf67.tar
cuberite-aa753a92c092a4d35b2ff7d08259c3196abecf67.tar.gz
cuberite-aa753a92c092a4d35b2ff7d08259c3196abecf67.tar.bz2
cuberite-aa753a92c092a4d35b2ff7d08259c3196abecf67.tar.lz
cuberite-aa753a92c092a4d35b2ff7d08259c3196abecf67.tar.xz
cuberite-aa753a92c092a4d35b2ff7d08259c3196abecf67.tar.zst
cuberite-aa753a92c092a4d35b2ff7d08259c3196abecf67.zip
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r--src/Bindings/PluginManager.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp
index c50100d6f..936c6b8a8 100644
--- a/src/Bindings/PluginManager.cpp
+++ b/src/Bindings/PluginManager.cpp
@@ -695,6 +695,25 @@ bool cPluginManager::CallHookPlayerEating(cPlayer & a_Player)
+bool cPluginManager::CallHookPlayerFoodLevelChange(cPlayer & a_Player, int & a_NewFoodLevel)
+{
+ FIND_HOOK(HOOK_PLAYER_FOOD_LEVEL_CHANGE);
+ VERIFY_HOOK;
+
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnPlayerFoodLevelChange(a_Player, a_NewFoodLevel))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
bool cPluginManager::CallHookPlayerFished(cPlayer & a_Player, const cItems a_Reward)
{
FIND_HOOK(HOOK_PLAYER_FISHED);