summaryrefslogtreecommitdiffstats
path: root/MCServer
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 /MCServer
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 'MCServer')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index a9e834361..1d441d8fb 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -582,10 +582,10 @@ function HandleTestWndCmd(a_Split, a_Player)
-- Test out the OnClosing callback's ability to refuse to close the window
local attempt = 1;
- local OnClosing = function(Window, Player)
- Player:SendMessage("Window closing attempt #" .. attempt);
+ local OnClosing = function(Window, Player, CanRefuse)
+ Player:SendMessage("Window closing attempt #" .. attempt .. "; CanRefuse = " .. tostring(CanRefuse));
attempt = attempt + 1;
- return (attempt <= 3); -- refuse twice, then allow
+ return CanRefuse and (attempt <= 3); -- refuse twice, then allow, unless CanRefuse is set to true
end
-- Log the slot changes