summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-02 19:13:36 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-02 19:13:36 +0200
commitc8953d165c037684b1373e090dea56daddc6e636 (patch)
treee5898c6adfa3e55570eb7a44df9fcf538af61cb9 /MCServer
parentAdded SetCustomName() to players. (diff)
downloadcuberite-c8953d165c037684b1373e090dea56daddc6e636.tar
cuberite-c8953d165c037684b1373e090dea56daddc6e636.tar.gz
cuberite-c8953d165c037684b1373e090dea56daddc6e636.tar.bz2
cuberite-c8953d165c037684b1373e090dea56daddc6e636.tar.lz
cuberite-c8953d165c037684b1373e090dea56daddc6e636.tar.xz
cuberite-c8953d165c037684b1373e090dea56daddc6e636.tar.zst
cuberite-c8953d165c037684b1373e090dea56daddc6e636.zip
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 179935c08..65ce0993a 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -38,6 +38,7 @@ function Initialize(Plugin)
-- _X: Disabled so that the normal operation doesn't interfere with anything
-- PM:AddHook(cPluginManager.HOOK_CHUNK_GENERATED, OnChunkGenerated);
+ PM:BindCommand("/cm", "debuggers", HandleCustomNameCmd, "- Gives you a custom name");
PM:BindCommand("/le", "debuggers", HandleListEntitiesCmd, "- Shows a list of all the loaded entities");
PM:BindCommand("/ke", "debuggers", HandleKillEntitiesCmd, "- Kills all the loaded entities");
PM:BindCommand("/wool", "debuggers", HandleWoolCmd, "- Sets all your armor to blue wool");
@@ -768,6 +769,22 @@ end
+function HandleCustomNameCmd(Split, Player)
+ if (Split[2] == nil) then
+ Player:SendMessage("Usage: /cm [CustomName]");
+ return true;
+ end
+
+ local NewName = Split[2]
+ Player:SetCustomName(NewName);
+ Player:SendMessageSuccess("Custom name setted to " .. Player:GetCustomName() .. "!")
+ return true
+end
+
+
+
+
+
function HandleListEntitiesCmd(Split, Player)
local NumEntities = 0;