Remove obsolete /afk list, since /who and tab list do a much better job anyways, and the command was undocumented anyways.

This commit is contained in:
UnknownShadow200 2017-11-03 17:26:58 +11:00
parent bd77b83ac6
commit 17edebbb8e
2 changed files with 2 additions and 13 deletions

View File

@ -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;

View File

@ -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(',');