go get github.com/juunini/palworld-rcon
package main
import (
"fmt"
"time"
palworldrcon "github.com/juunini/palworld-rcon"
)
func main() {
client, err := palworldrcon.Connect("127.0.0.1", 25575, "your admin password", 15 * time.Second)
if err != nil {
panic(err)
}
defer client.Disconnect()
response, err := client.Info()
if err != nil {
panic(err)
}
fmt.Println(response) // "Welcome to Pal Server[v0.1.4.1] Default Palworld Server"
}
see: https://tech.palworldgame.com/settings-and-operation/commands
| Method name |
Properties |
Description |
| Connect |
|
Connect to RCON Server |
| Disconnect |
|
Close Connection |
| Shutdown |
seconds, message |
Shutdown the server. If <seconds> is specified, the server will shut down after the specified time has elapsed. The server participant will be notified of what you have entered in <message>. |
| DoExit |
|
Force stop the server. |
| Broadcast |
message |
Send message to all player in the server. |
| KickPlayer |
steamID |
Kick player by <steamID> from the server. |
| BanPlayer |
steamID |
Ban player by <steamID> from the server. |
| ShowPlayers |
|
Show information on all connected players. |
| Info |
|
Show server information. |
| Save |
|
Save the world data. |
MIT License