summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2017-08-17 16:27:43 +0200
committerMattes D <github@xoft.cz>2017-08-17 16:27:43 +0200
commit1ec85a2b2cb285bcc019258c8fddcddfcda84fa8 (patch)
treeb6511b8d1ecae466815dc7376322f1bd617dbc6d /src/Bindings/PluginManager.cpp
parentAdd support for 1.12.1 (#3908) (diff)
downloadcuberite-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 '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 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);