using System;
namespace ClassicalSharp.Entities {
public sealed class TabList : IGameComponent {
public TabListEntry[] Entries = new TabListEntry[256];
public void Init(Game game) { }
public void Ready(Game game) { }
public void OnNewMapLoaded(Game game) { }
public void Dispose() { }
public void OnNewMap(Game game) { }
public void Reset(Game game) {
for (int i = 0; i < Entries.Length; i++)
Entries[i] = null;
}
}
public sealed class TabListEntry {
public byte NameId;
/// Unformatted name of the player for autocompletion, etc.
/// Colour codes are always removed from this.
public string PlayerName;
/// Formatted name for display in the player list.
/// Can include colour codes.
public string ListName;
/// Name of the group this player is in.
/// Can include colour codes.
public string GroupName;
/// Player's rank within the group. (0 is highest)
/// Multiple group members can share the same rank,
/// so a player's group rank is not a unique identifier.
public byte GroupRank;
public TabListEntry(byte id, string playerName, string listName,
string groupName, byte groupRank) {
NameId = id;
PlayerName = playerName;
ListName = listName;
GroupName = groupName;
GroupRank = groupRank;
}
}
}