public IPacket ReadPacket(IMinecraftDataReader reader) { TeamName = reader.ReadString(); Action = (TeamAction)reader.ReadByte(); switch (Action) { case TeamAction.CreateTeam: Team = new TeamsCreateTeam().FromReader(reader); break; case TeamAction.RemoveTeam: Team = new TeamsRemoveTeam().FromReader(reader); break; case TeamAction.UpdateTeam: Team = new TeamsUpdateTeam().FromReader(reader); break; case TeamAction.AddPlayers: Team = new TeamsAddPlayers().FromReader(reader); break; case TeamAction.RemovePlayers: Team = new TeamsRemovePlayers().FromReader(reader); break; } return(this); }
public IPacket ReadPacket(IMinecraftDataReader reader) { TeamName = reader.ReadString(); Action = (TeamAction) reader.ReadByte(); switch (Action) { case TeamAction.CreateTeam: Team = new TeamsCreateTeam().FromReader(reader); break; case TeamAction.RemoveTeam: Team = new TeamsRemoveTeam().FromReader(reader); break; case TeamAction.UpdateTeam: Team = new TeamsUpdateTeam().FromReader(reader); break; case TeamAction.AddPlayers: Team = new TeamsAddPlayers().FromReader(reader); break; case TeamAction.RemovePlayers: Team = new TeamsRemovePlayers().FromReader(reader); break; } return this; }