static void CloakCommand(Client player, string[] cmd, int iarg) { if (player.Admin(Permissions.Cloak) == false) { return; } if (cmd.Length < 2) { TellMode(player); return; } switch (cmd [iarg]) { case "clear": case "reset": case "normal": case "off": SetCloak(player, null); break; case "none": case "invisible": case "on": SetCloak(player, MobType.None.ToString()); break; /* * case "Villager": * case "Snowman": * case "EnderDragon": * player.Tell (Chat.Red, cmd [1] + " is disabled/not working"); * return; */ case "back": if (cloakBack.ContainsKey(player.MinecraftUsername) == false) { throw new ErrorException("No saved position, use /cloak first"); } player.Warp(cloakBack [player.MinecraftUsername], player.Session.Dimension, World.Main); break; default: SetCloak(player, cmd [iarg]); break; } }
static void CloakCommand(Client player, string[] cmd, int iarg) { if (player.Admin() == false) return; if (cmd.Length < 2) { TellMode(player); return; } switch (cmd [iarg]) { case "clear": case "reset": case "normal": case "off": SetCloak(player, null); break; case "none": case "invisible": case "on": SetCloak(player, MobType.None.ToString()); break; /* case "Villager": case "Snowman": case "EnderDragon": player.Tell (Chat.Red, cmd [1] + " is disabled/not working"); return; */ case "back": if (cloakBack.ContainsKey(player.MinecraftUsername) == false) throw new ErrorException("No saved position, use /cloak first"); player.Warp(cloakBack [player.MinecraftUsername], player.Session.Dimension, World.Main); break; default: SetCloak(player, cmd [iarg]); break; } }