mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
feat: add Teams packet support (parsing, state tracking, /teams command, bot API)
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/72ea891e-ba62-4dfc-bbba-f197cd1d0404 Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
This commit is contained in:
parent
cf65c6f241
commit
fdbffcc5bb
8 changed files with 397 additions and 1 deletions
49
MinecraftClient/Mapping/PlayerTeam.cs
Normal file
49
MinecraftClient/Mapping/PlayerTeam.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace MinecraftClient.Mapping
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a Minecraft scoreboard team and its current state.
|
||||
/// </summary>
|
||||
public class PlayerTeam
|
||||
{
|
||||
/// <summary>Team internal name (up to 16 chars)</summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Display name component (formatted text)</summary>
|
||||
public string DisplayName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Friendly fire is allowed between team members</summary>
|
||||
public bool AllowFriendlyFire { get; set; }
|
||||
|
||||
/// <summary>Team members can see invisible teammates</summary>
|
||||
public bool SeeFriendlyInvisibles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Nametag visibility rule.
|
||||
/// Values: "always", "hideForOtherTeams", "hideForOwnTeam", "never"
|
||||
/// </summary>
|
||||
public string NameTagVisibility { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Collision rule.
|
||||
/// Values: "always", "pushOtherTeams", "pushOwnTeam", "never"
|
||||
/// </summary>
|
||||
public string CollisionRule { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Team color as ChatFormatting enum ordinal (-1 = RESET/none,
|
||||
/// 0–15 = BLACK … WHITE).
|
||||
/// </summary>
|
||||
public int Color { get; set; } = -1;
|
||||
|
||||
/// <summary>Prefix displayed before member names (formatted text)</summary>
|
||||
public string Prefix { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Suffix displayed after member names (formatted text)</summary>
|
||||
public string Suffix { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Current set of player / entity names on this team</summary>
|
||||
public HashSet<string> Members { get; } = new(System.StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue