From 9dab3c4e8fad37d76bbed7a71888d582a047275a Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 19 May 2013 18:37:01 +0000 Subject: Debuggers: a simple test of armor slot setting git-svn-id: http://mc-server.googlecode.com/svn/trunk@1494 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- MCServer/Plugins/Debuggers/Debuggers.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index f3da1ed4b..c774f15d4 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -17,8 +17,9 @@ function Initialize(Plugin) PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_USING_ITEM); PluginManager:AddHook(Plugin, cPluginManager.HOOK_TAKE_DAMAGE); - PluginManager:BindCommand("/le", "debuggers", HandleListEntitiesCmd, " - Shows a list of all the loaded entities"); - PluginManager:BindCommand("/ke", "debuggers", HandleKillEntitiesCmd, " - Kills all the loaded entities"); + PluginManager:BindCommand("/le", "debuggers", HandleListEntitiesCmd, " - Shows a list of all the loaded entities"); + PluginManager:BindCommand("/ke", "debuggers", HandleKillEntitiesCmd, " - Kills all the loaded entities"); + PluginManager:BindCommand("/wool", "debuggers", HandleWoolCmd, " - Sets all your armor to blue wool"); -- Enable the following line for BlockArea / Generator interface testing: -- PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_GENERATED); @@ -452,3 +453,12 @@ end + +function HandleWoolCmd(Split, Player) + local Wool = cItem(E_BLOCK_WOOL, 1, E_META_WOOL_BLUE); + Player:GetInventory():SetSlot(5, Wool); + Player:GetInventory():SetSlot(6, Wool); + Player:GetInventory():SetSlot(7, Wool); + Player:GetInventory():SetSlot(8, Wool); + return true; +end \ No newline at end of file -- cgit v1.2.3