package main import ( "encoding/json" "net/http" "aytechnology.us/gominecraft/mod/mc" "aytechnology.us/gominecraft/mod/mcping" ) func SendCommand(w http.ResponseWriter, r *http.Request) { command, _ := mv(r, "command", false) MCServer.SendCommand(command) sendJSONResponse(w, "OK") } func ServerInfo(w http.ResponseWriter, r *http.Request) { resp, _ := mcping.Ping("localhost:25565") for _, item := range resp.Sample { skin := mc.NewHandler(item.UUID, "./server/skin/") skin.DownloadSkin() } jsonData, _ := json.Marshal(resp) sendJSONResponse(w, string(jsonData)) }