summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/ProtectionAreas/CommandHandlers.lua
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-26 21:20:49 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-26 21:20:49 +0200
commit89d9abf9115a74a063e547f84a076165196954bf (patch)
tree131d27b85f7da7cd9cf19482b00549bda04aaf17 /MCServer/Plugins/ProtectionAreas/CommandHandlers.lua
parentBlock entities with storage now correctly mark the chunk as dirty when their contents change. (diff)
downloadcuberite-89d9abf9115a74a063e547f84a076165196954bf.tar
cuberite-89d9abf9115a74a063e547f84a076165196954bf.tar.gz
cuberite-89d9abf9115a74a063e547f84a076165196954bf.tar.bz2
cuberite-89d9abf9115a74a063e547f84a076165196954bf.tar.lz
cuberite-89d9abf9115a74a063e547f84a076165196954bf.tar.xz
cuberite-89d9abf9115a74a063e547f84a076165196954bf.tar.zst
cuberite-89d9abf9115a74a063e547f84a076165196954bf.zip
Diffstat (limited to 'MCServer/Plugins/ProtectionAreas/CommandHandlers.lua')
-rw-r--r--MCServer/Plugins/ProtectionAreas/CommandHandlers.lua98
1 files changed, 98 insertions, 0 deletions
diff --git a/MCServer/Plugins/ProtectionAreas/CommandHandlers.lua b/MCServer/Plugins/ProtectionAreas/CommandHandlers.lua
new file mode 100644
index 000000000..21049a517
--- /dev/null
+++ b/MCServer/Plugins/ProtectionAreas/CommandHandlers.lua
@@ -0,0 +1,98 @@
+
+-- CommandHandlers.lua
+-- Defines the individual command handlers
+
+
+
+
+
+function InitializeCommandHandlers()
+ local PlgMgr = cRoot:Get():GetPluginManager();
+ for idx, Cmd in ipairs(CommandReg()) do
+ PlgMgr:BindCommand(Cmd[2], Cmd[3], Cmd[1], Cmd[4]);
+ end
+end
+
+
+
+
+
+--- Handles the ProtAdd command
+function HandleAddArea(a_Split, a_Player)
+ -- Command syntax: ProtAdd username1 [username2] [username3] ...
+ if (#a_Split < 2) then
+ a_Player:SendMessage("Not enough parameters. Expected a list of usernames.");
+ return true;
+ end
+
+ -- TODO: Add the area to the storage and reload all currently logged in players
+
+ return true;
+end
+
+
+
+
+
+function HandleAddAreaCoords(a_Split, a_Player)
+ -- TODO
+end
+
+
+
+
+
+function HandleAddAreaUser(a_Split, a_Player)
+ -- TODO
+end
+
+
+
+
+
+function HandleDelArea(a_Split, a_Player)
+ -- TODO
+end
+
+
+
+
+
+function HandleGiveWand(a_Split, a_Player)
+ local NumGiven = a_Player:GetInventory():AddItem(cConfig:GetWandItem());
+ if (NumGiven == 1) then
+ a_Player:SendMessage("Wand given");
+ else
+ a_Player:SendMessage("Cannot give wand, no space in your inventory");
+ end
+ return true;
+end
+
+
+
+
+
+function HandleListAreas(a_Split, a_Player)
+ -- TODO
+end
+
+
+
+
+
+function HandleRemoveUser(a_Split, a_Player)
+ -- TODO
+end
+
+
+
+
+
+function HandleRemoveUserAll(a_Split, a_Player)
+ -- TODO
+end
+
+
+
+
+