summaryrefslogtreecommitdiffstats
path: root/Core/help.lua
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-07-27 17:22:27 +0200
committerAlexander Harkness <bearbin@gmail.com>2013-07-27 17:22:27 +0200
commit66e837ecbc08ece3150a364976db87f56813d30b (patch)
tree1593ac9b849f3416aafa70c440694200c62e6b2c /Core/help.lua
parentAdded the new core as a subtree. (diff)
downloadcuberite-66e837ecbc08ece3150a364976db87f56813d30b.tar
cuberite-66e837ecbc08ece3150a364976db87f56813d30b.tar.gz
cuberite-66e837ecbc08ece3150a364976db87f56813d30b.tar.bz2
cuberite-66e837ecbc08ece3150a364976db87f56813d30b.tar.lz
cuberite-66e837ecbc08ece3150a364976db87f56813d30b.tar.xz
cuberite-66e837ecbc08ece3150a364976db87f56813d30b.tar.zst
cuberite-66e837ecbc08ece3150a364976db87f56813d30b.zip
Diffstat (limited to 'Core/help.lua')
-rw-r--r--Core/help.lua41
1 files changed, 0 insertions, 41 deletions
diff --git a/Core/help.lua b/Core/help.lua
deleted file mode 100644
index 339fc054b..000000000
--- a/Core/help.lua
+++ /dev/null
@@ -1,41 +0,0 @@
-function HandleHelpCommand(Split, Player)
- local PluginManager = cRoot:Get():GetPluginManager()
-
- local LinesPerPage = 8;
- local CurrentPage = 1;
- local CurrentLine = 0;
- local PageRequested = 1;
- local Output = {};
-
- if (#Split == 2) then
- PageRequested = tonumber(Split[2]);
- end
-
- local Process = function(Command, Permission, HelpString)
- if not(Player:HasPermission(Permission)) then
- return false;
- end;
- if (HelpString == "") then
- return false;
- end;
-
- CurrentLine = CurrentLine + 1;
- CurrentPage = math.floor(CurrentLine / LinesPerPage) + 1;
- if (CurrentPage ~= PageRequested) then
- return false;
- end;
- table.insert(Output, cChatColor.Blue .. Command .. HelpString);
- end
-
- PluginManager:ForEachCommand(Process);
-
- -- CurrentPage now contains the total number of pages, and Output has the individual help lines to be sent
-
- Player:SendMessage(cChatColor.Purple .. "---------- [COMMANDS HELP " .. cChatColor.Gold .. "(Page " .. PageRequested .. " / " .. CurrentPage .. ")" .. cChatColor.Purple .. "] -----------");
- Player:SendMessage(cChatColor.Purple .. "'-' means no prefix, '~' means a value is required.");
- for idx, msg in ipairs(Output) do
- Player:SendMessage(msg);
- end;
-
- return true
-end \ No newline at end of file