Skip to content

juunini/palworld-rcon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Palworld RCON

Palworld Icon

Install

go get github.com/juunini/palworld-rcon

Usage

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"
}

Client Methods

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.

License

MIT License