Forgot chat tokens don't show on IRC:

This commit is contained in:
UnknownShadow200 2017-10-27 08:46:03 +11:00
parent 306c3d9ec3
commit 652f48ea14
3 changed files with 18 additions and 20 deletions

View File

@ -31,7 +31,7 @@ namespace MCGalaxy.Commands.Info {
Group grp = Matcher.FindRanks(p, message);
if (grp == null) return;
string title = ":" + grp.Color + GetPlural(grp.Name) + ":";
Section rankSec = MakeSection(grp, title);
Section rankSec = MakeSection(grp, title);
Player[] players = PlayerInfo.Online.Items;
foreach (Player pl in players) {
@ -41,7 +41,7 @@ namespace MCGalaxy.Commands.Info {
AddStates(pl, ref name);
rankSec.Append(pl, name);
}
}
}
if (rankSec.Empty) {
Player.Message(p, "There are no players of that rank online.");
@ -57,18 +57,26 @@ namespace MCGalaxy.Commands.Info {
playerList.Add(MakeSection(grp, title));
}
int totalPlayers = 0;
Player[] online = PlayerInfo.Online.Items;
foreach (Player pl in online) {
if (p == pl || Entities.CanSee(p, pl)) {
string name = Colors.Strip(pl.DisplayName);
AddStates(pl, ref name);
totalPlayers++;
playerList.Find(grp => grp.group == pl.group).Append(pl, name);
}
}
Player.Message(p, "There are &a$online %Splayers online.");
for (int i = playerList.Count - 1; i >= 0; i--)
if (totalPlayers == 1) {
Player.Message(p, "There is &a1 %Splayer online.");
} else {
Player.Message(p, "There are &a" + totalPlayers + " %Splayers online.");
}
for (int i = playerList.Count - 1; i >= 0; i--) {
playerList[i].Print(p, ServerConfig.ListEmptyRanks);
}
}
static void AddStates(Player pl, ref string name) {

View File

@ -23,27 +23,18 @@ using MCGalaxy.Commands.World;
namespace MCGalaxy.Games {
public sealed class CountdownGame : IGame {
/// <summary> All players who are playing this countdown game. </summary>
public VolatileArray<Player> Players = new VolatileArray<Player>();
/// <summary> Players who are still alive in the current round. </summary>
public VolatileArray<Player> Remaining = new VolatileArray<Player>();
/// <summary> Current status of the countdown game. </summary>
public CountdownGameStatus Status = CountdownGameStatus.Disabled;
// <summary> Gets whether countdown is currently running. </summary>
public override bool Running { get { return Status != CountdownGameStatus.Disabled; } }
public override bool Running { get { return Status != CountdownGameStatus.Disabled; } }
/// <summary> Whether players are allowed to teleport to others when not in referee mode. </summary>
public override bool TeleportAllowed { get { return Status == CountdownGameStatus.RoundInProgress; } }
/// <summary> Whether the game is running in freeze mode or not. </summary>
public bool FreezeMode = false;
/// <summary> Interval the game is removing squares at. (lower interval is faster game). </summary>
public int Interval;
/// <summary> Speed type. (slow, fast, extreme, etc) </summary>
public string SpeedType;
public string SpeedType;
CountdownPlugin plugin = new CountdownPlugin();
List<SquarePos> squaresLeft = new List<SquarePos>();

View File

@ -24,7 +24,6 @@ namespace MCGalaxy.Games {
public sealed partial class ZSGame : IGame {
public LevelPicker Picker = new ZSLevelPicker();
/// <summary> Whether players are allowed to teleport to others when not in referee mode. </summary>
public override bool TeleportAllowed { get { return !RoundInProgress; } }
public override void PlayerLeftGame(Player p) {