From 17edebbb8eece626483fa6e96d66cb75db01ee50 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Fri, 3 Nov 2017 17:26:58 +1100 Subject: [PATCH] Remove obsolete /afk list, since /who and tab list do a much better job anyways, and the command was undocumented anyways. --- MCGalaxy/Commands/Chat/CmdAfk.cs | 13 +------------ MCGalaxy/Levels/LevelInfo.cs | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/MCGalaxy/Commands/Chat/CmdAfk.cs b/MCGalaxy/Commands/Chat/CmdAfk.cs index 5fb43e694..6c72d9cf1 100644 --- a/MCGalaxy/Commands/Chat/CmdAfk.cs +++ b/MCGalaxy/Commands/Chat/CmdAfk.cs @@ -24,18 +24,7 @@ namespace MCGalaxy.Commands.Chatting { public override string type { get { return CommandTypes.Information; } } public override bool SuperUseable { get { return false; } } - public override void Use(Player p, string message) { - if (message.CaselessEq("list")) { - Player[] players = PlayerInfo.Online.Items; - foreach (Player pl in players) { - if (!Entities.CanSee(p, pl) || !pl.IsAfk) continue; - Player.Message(p, pl.ColoredName); - } - return; - } - ToggleAfk(p, message); - } - + public override void Use(Player p, string message) { ToggleAfk(p, message); } internal static void ToggleAfk(Player p, string message) { if (p.joker) message = ""; p.AutoAfk = false; diff --git a/MCGalaxy/Levels/LevelInfo.cs b/MCGalaxy/Levels/LevelInfo.cs index b423f91ad..8e85a1cda 100644 --- a/MCGalaxy/Levels/LevelInfo.cs +++ b/MCGalaxy/Levels/LevelInfo.cs @@ -137,7 +137,7 @@ namespace MCGalaxy { return true; } - internal static bool IsRealmOwner(string name, string map) { + public static bool IsRealmOwner(string name, string map) { Level lvl = null; LevelConfig cfg = GetConfig(map, out lvl); string[] owners = cfg.RealmOwner.Replace(" ", "").Split(',');