static void DoReload(Player p, Level lvl) { Player[] players = PlayerInfo.Online.Items; foreach (Player pl in players) { if (pl.level == lvl) { LevelActions.ReloadFor(p, pl, true); } } Server.DoGC(); }
public override void Use(Player p, string message, CommandData data) { if (CheckSuper(p, message, "player or level name")) { return; } if (message.Length == 0) { message = p.name; } string[] parts = message.SplitSpaces(); if (!parts[0].CaselessEq("all")) { LevelActions.ReloadFor(p, p, true); } else { Level lvl = p.level; if (parts.Length == 2) { lvl = Matcher.FindLevels(p, parts[1]); if (lvl == null) { return; } } else if (p.IsSuper) { SuperRequiresArgs(name + " all", p, "level name"); return; } if (!CheckExtraPerm(p, data, 1)) { return; } LevelActions.ReloadAll(lvl, p, true); } Server.DoGC(); }