From 0d323563e4cc507e58ce1bb3ba632cf2310602c9 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 18 Aug 2013 13:26:37 +0200 Subject: Added cWindow property manipulation API. Now enchantment table and furnace properties can be set by a plugin --- MCServer/Plugins/Debuggers/Debuggers.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'MCServer') diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index e864cfe92..2041b17ee 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -35,6 +35,7 @@ function Initialize(Plugin) PluginManager:BindCommand("/starve", "debuggers", HandleStarveCmd, "- Sets the food level to zero"); PluginManager:BindCommand("/fl", "debuggers", HandleFoodLevelCmd, "- Sets the food level to the given value"); PluginManager:BindCommand("/spidey", "debuggers", HandleSpideyCmd, "- Shoots a line of web blocks until it hits non-air"); + PluginManager:BindCommand("/ench", "debuggers", HandleEnchCmd, "- Provides an instant dummy enchantment window"); -- Enable the following line for BlockArea / Generator interface testing: -- PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_GENERATED); @@ -739,3 +740,11 @@ end + +function HandleEnchCmd(a_Split, a_Player) + local Wnd = cLuaWindow(cWindow.Enchantment, 1, 1, "Ench") + a_Player:OpenWindow(Wnd) + Wnd:SetProperty(0, 10) + Wnd:SetProperty(1, 15) + Wnd:SetProperty(2, 25) +end \ No newline at end of file -- cgit v1.2.3