func SendToAll(packet protocol.Packet) { baked := protocol.BakePacket(packet) for _, player := range players { if player.Authenticated() { go player.SendPacketSync(baked) } } }
func SendToAllExcept(exclude Player, packet protocol.Packet) { baked := protocol.BakePacket(packet) for _, player := range players { if player.ID() == exclude.ID() { continue } if player.Authenticated() { go player.SendPacketSync(baked) } } }