diff options
author | Mattes D <github@xoft.cz> | 2014-07-02 16:33:24 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-07-02 16:33:24 +0200 |
commit | 9204c8a124c015be6919be8428517e0e3f0429e7 (patch) | |
tree | 4038c19d1cb7f74baf427923869c5c450ed1583c /src/Bindings/PluginManager.cpp | |
parent | CMake: Use cmake for file-copying. (diff) | |
parent | Update documentation (diff) | |
download | cuberite-9204c8a124c015be6919be8428517e0e3f0429e7.tar cuberite-9204c8a124c015be6919be8428517e0e3f0429e7.tar.gz cuberite-9204c8a124c015be6919be8428517e0e3f0429e7.tar.bz2 cuberite-9204c8a124c015be6919be8428517e0e3f0429e7.tar.lz cuberite-9204c8a124c015be6919be8428517e0e3f0429e7.tar.xz cuberite-9204c8a124c015be6919be8428517e0e3f0429e7.tar.zst cuberite-9204c8a124c015be6919be8428517e0e3f0429e7.zip |
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r-- | src/Bindings/PluginManager.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp index c50100d6f..3cb8c99a1 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); |