summaryrefslogtreecommitdiffstats
path: root/src/Entities
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/Entities
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/Entities')
-rw-r--r--src/Entities/Player.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 3bbe334fb..3e6d912dd 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1321,10 +1321,16 @@ cTeam * cPlayer::UpdateTeam(void)
void cPlayer::OpenWindow(cWindow & a_Window)
{
+ if (cRoot::Get()->GetPluginManager()->CallHookPlayerOpeningWindow(*this, a_Window))
+ {
+ return;
+ }
+
if (&a_Window != m_CurrentWindow)
{
CloseWindow(false);
}
+
a_Window.OpenedByPlayer(*this);
m_CurrentWindow = &a_Window;
a_Window.SendWholeWindow(*GetClientHandle());