diff options
author | Lane Kolbly <lane@rscheme.org> | 2017-08-17 16:27:43 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-08-17 16:27:43 +0200 |
commit | 1ec85a2b2cb285bcc019258c8fddcddfcda84fa8 (patch) | |
tree | b6511b8d1ecae466815dc7376322f1bd617dbc6d /src/Bindings/PluginManager.cpp | |
parent | Add support for 1.12.1 (#3908) (diff) | |
download | cuberite-1ec85a2b2cb285bcc019258c8fddcddfcda84fa8.tar cuberite-1ec85a2b2cb285bcc019258c8fddcddfcda84fa8.tar.gz cuberite-1ec85a2b2cb285bcc019258c8fddcddfcda84fa8.tar.bz2 cuberite-1ec85a2b2cb285bcc019258c8fddcddfcda84fa8.tar.lz cuberite-1ec85a2b2cb285bcc019258c8fddcddfcda84fa8.tar.xz cuberite-1ec85a2b2cb285bcc019258c8fddcddfcda84fa8.tar.zst cuberite-1ec85a2b2cb285bcc019258c8fddcddfcda84fa8.zip |
Diffstat (limited to '')
-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 066ccf9d7..1d977fcde 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -999,6 +999,25 @@ bool cPluginManager::CallHookPlayerMoving(cPlayer & a_Player, const Vector3d & a +bool cPluginManager::CallHookPlayerOpeningWindow(cPlayer & a_Player, cWindow & a_Window) +{ + FIND_HOOK(HOOK_PLAYER_OPENING_WINDOW); + VERIFY_HOOK; + + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) + { + if ((*itr)->OnPlayerOpeningWindow(a_Player, a_Window)) + { + return true; + } + } + return false; +} + + + + + bool cPluginManager::CallHookPlayerPlacedBlock(cPlayer & a_Player, const sSetBlock & a_BlockChange) { FIND_HOOK(HOOK_PLAYER_PLACED_BLOCK); |