diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2013-12-30 22:56:08 +0100 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2013-12-30 22:56:08 +0100 |
commit | cd435ffca970f954d2ade1e81c7c4ae7df75907e (patch) | |
tree | 76dd51fc9c073abcc96b7a4ce3d998438f137bba /src/Bindings/PluginManager.cpp | |
parent | Fixed compilation in VC2008. (diff) | |
download | cuberite-cd435ffca970f954d2ade1e81c7c4ae7df75907e.tar cuberite-cd435ffca970f954d2ade1e81c7c4ae7df75907e.tar.gz cuberite-cd435ffca970f954d2ade1e81c7c4ae7df75907e.tar.bz2 cuberite-cd435ffca970f954d2ade1e81c7c4ae7df75907e.tar.lz cuberite-cd435ffca970f954d2ade1e81c7c4ae7df75907e.tar.xz cuberite-cd435ffca970f954d2ade1e81c7c4ae7df75907e.tar.zst cuberite-cd435ffca970f954d2ade1e81c7c4ae7df75907e.zip |
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r-- | src/Bindings/PluginManager.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp index ffffe1a23..b863a95b5 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -694,6 +694,48 @@ bool cPluginManager::CallHookPlayerEating(cPlayer & a_Player) +bool cPluginManager::CallHookPlayerFished(cPlayer & a_Player, cItems a_Reward) +{ + HookMap::iterator Plugins = m_Hooks.find(HOOK_PLAYER_FISHED); + if (Plugins == m_Hooks.end()) + { + return false; + } + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) + { + if ((*itr)->OnPlayerFished(a_Player, a_Reward)) + { + return true; + } + } + return false; +} + + + + + +bool cPluginManager::CallHookPlayerFishing(cPlayer & a_Player, cItems a_Reward) +{ + HookMap::iterator Plugins = m_Hooks.find(HOOK_PLAYER_FISHING); + if (Plugins == m_Hooks.end()) + { + return false; + } + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) + { + if ((*itr)->OnPlayerFishing(a_Player, a_Reward)) + { + return true; + } + } + return false; +} + + + + + bool cPluginManager::CallHookPlayerJoined(cPlayer & a_Player) { HookMap::iterator Plugins = m_Hooks.find(HOOK_PLAYER_JOINED); |