mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Remove tab display name experiment (not working)
- Tab display names should hold display name but... - Server sends <UUID, name, null> x Player count - TabListPlus sends <SlotID, ???tab#01, SlotText> x Slot Count - So we don't have player display names, only worthless slots - So the whole feature was useless, reverting to name only.
This commit is contained in:
parent
61ce935c63
commit
2a07fbbae6
9 changed files with 18 additions and 141 deletions
|
|
@ -23,7 +23,7 @@ namespace MinecraftClient
|
|||
|
||||
private static readonly List<string> cmd_names = new List<string>();
|
||||
private static readonly Dictionary<string, Command> cmds = new Dictionary<string, Command>();
|
||||
private readonly Dictionary<Guid, PlayerInfo> onlinePlayers = new Dictionary<Guid, PlayerInfo>();
|
||||
private readonly Dictionary<Guid, string> onlinePlayers = new Dictionary<Guid, string>();
|
||||
|
||||
private readonly List<ChatBot> bots = new List<ChatBot>();
|
||||
private static readonly List<ChatBots.Script> scripts_on_hold = new List<ChatBots.Script>();
|
||||
|
|
@ -569,16 +569,16 @@ namespace MinecraftClient
|
|||
/// Triggered when a new player joins the game
|
||||
/// </summary>
|
||||
/// <param name="uuid">UUID of the player</param>
|
||||
/// <param name="info">Info about this player</param>
|
||||
public void OnPlayerJoin(PlayerInfo info)
|
||||
/// <param name="name">Name of the player</param>
|
||||
public void OnPlayerJoin(Guid uuid, string name)
|
||||
{
|
||||
//Ignore placeholders eg 0000tab# from TabListPlus
|
||||
if (!ChatBot.IsValidName(info.Name))
|
||||
if (!ChatBot.IsValidName(name))
|
||||
return;
|
||||
|
||||
lock (onlinePlayers)
|
||||
{
|
||||
onlinePlayers[info.UUID] = info;
|
||||
onlinePlayers[uuid] = name;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -598,7 +598,7 @@ namespace MinecraftClient
|
|||
/// Get a set of online player names
|
||||
/// </summary>
|
||||
/// <returns>Online player names</returns>
|
||||
public PlayerInfo[] GetOnlinePlayers()
|
||||
public string[] GetOnlinePlayers()
|
||||
{
|
||||
lock (onlinePlayers)
|
||||
{
|
||||
|
|
@ -606,21 +606,6 @@ namespace MinecraftClient
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get an online player by UUID
|
||||
/// </summary>
|
||||
/// <param name="uuid">Player UUID</param>
|
||||
/// <returns>The player, or NULL if not found</returns>
|
||||
public PlayerInfo GetPlayer(Guid uuid)
|
||||
{
|
||||
lock (onlinePlayers)
|
||||
{
|
||||
if (onlinePlayers.ContainsKey(uuid))
|
||||
return onlinePlayers[uuid];
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers the given plugin channel for the given bot.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue