mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Default to no team color when receiving unknown values. Closes #376
This commit is contained in:
parent
63e06fabad
commit
1728e10f37
1 changed files with 6 additions and 1 deletions
|
@ -127,7 +127,12 @@ public class ServerTeamPacket extends MinecraftPacket {
|
|||
this.seeFriendlyInvisibles = (flags & 0x2) != 0;
|
||||
this.nameTagVisibility = MagicValues.key(NameTagVisibility.class, in.readString());
|
||||
this.collisionRule = MagicValues.key(CollisionRule.class, in.readString());
|
||||
this.color = MagicValues.key(TeamColor.class, in.readByte());
|
||||
|
||||
try {
|
||||
this.color = MagicValues.key(TeamColor.class, in.readByte());
|
||||
} catch(IllegalArgumentException e) {
|
||||
this.color = TeamColor.NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.action == TeamAction.CREATE || this.action == TeamAction.ADD_PLAYER || this.action == TeamAction.REMOVE_PLAYER) {
|
||||
|
|
Loading…
Reference in a new issue