package serverCommunication

import (
	"github.com/gofiber/websocket/v2"
	"krakatoa.net/backend/modules/kraProtocol"
	"krakatoa.net/backend/modules/logger"
)

func getConnForDest(dest int, uuid string) *websocket.Conn {
	switch dest {
	case kraProtocol.DestVoice:
		return GetWebClientByUuid(uuid).VoiceConn
	case kraProtocol.DestMobile:
		return GetWebClientByUuid(uuid).MobileConn
	case kraProtocol.DestProxy:
		return GetMinecraftClientByName("proxy-1").Connection
	case kraProtocol.DestPlayersCurrentServer:
		return GetMinecraftClientByName("lobby-1").Connection
	default:
		logger.Web.Println("conn for dest is nil")
		return nil
	}
}
