summaryrefslogtreecommitdiffstats
path: root/source/LuaWindow.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-02 23:59:25 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-02 23:59:25 +0200
commit8ff22344af60a8f1d7de4501f04c7f659bd5bb08 (patch)
treedb241c9647d8e4c51d49d1f47c1b3236842f3747 /source/LuaWindow.cpp
parentAdded the possibility to specify enchantments by name in the constructor and AddFromString() function (diff)
downloadcuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.tar
cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.tar.gz
cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.tar.bz2
cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.tar.lz
cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.tar.xz
cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.tar.zst
cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.zip
Diffstat (limited to '')
-rw-r--r--source/LuaWindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/LuaWindow.cpp b/source/LuaWindow.cpp
index f6277250c..13d06eeb6 100644
--- a/source/LuaWindow.cpp
+++ b/source/LuaWindow.cpp
@@ -117,20 +117,20 @@ void cLuaWindow::SetOnSlotChanged(cPlugin_NewLua * a_Plugin, int a_FnRef)
-bool cLuaWindow::ClosedByPlayer(cPlayer & a_Player)
+bool cLuaWindow::ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse)
{
// First notify the plugin through the registered callback:
if (m_OnClosingFnRef != LUA_REFNIL)
{
ASSERT(m_Plugin != NULL);
- if (m_Plugin->CallbackWindowClosing(m_OnClosingFnRef, *this, a_Player))
+ if (m_Plugin->CallbackWindowClosing(m_OnClosingFnRef, *this, a_Player, a_CanRefuse))
{
- // The callback disagrees
+ // The callback disagrees (the higher levels check the CanRefuse flag compliance)
return false;
}
}
- return super::ClosedByPlayer(a_Player);
+ return super::ClosedByPlayer(a_Player, a_CanRefuse);
}