pixelmon

package
v0.0.0-...-a654aa5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Online = iota
	Offline
	Not_Found
	Err_Status
	Starting
	Err_Start
	Stopping
	Err_Stop
	Whitelist
	Success_Whitelist
	Err_Whitelist
	NumPlayers
	Err_NumPlayers
	SendingMessage
	Success_SendingMessage
	Err_SendingMessage
)
View Source
const (
	MinecraftersRoleName = "Minecrafters"
)

Variables

View Source
var (
	RequiredRoleNames = []string{
		MinecraftersRoleName,
	}

	Message = []string{
		":green_circle:   Pixelmon is ONLINE",
		":red_circle:   Pixelmon is OFFLINE",
		":grey_exclamation:   No Pixelmon server was found",
		":exclamation:   Error checking Pixelmon's status",
		":green_square:   Starting the Pixelmon server",
		":exclamation:  Failed to start the Pixelmon server",
		":red_square:   Stopping the Pixelmon server",
		":exclamation:   Failed to stop the Pixelmon server",
		":green_square:   Sending command to whitelist ",
		":green_circle:   Successfully sent command to whitelist ",
		":exclamation:   Error sending command to whitelist ",
		":green_circle:   Current Number of Players: ",
		":exclamation:   Error getting number of players",
		":green_square:   Sending command to say ",
		":green_circle:   Successfully sent command to say ",
		":exclamation:   Error sending command to say ",
	}
)

Functions

func AddToWhitelist

func AddToWhitelist(username string) error

AddToWhitelist takes a username and runs the /whitelist add command

func GetNumberOfPlayers

func GetNumberOfPlayers() (int, error)

GetNumberOfPlayers gets the number of online players on the Minecraft server

func GetStatus

func GetStatus() (string, error)

GetStatus returns whether the EC2 instance is online or offline

func SendMessage

func SendMessage(msg string) error

SendMessage takes a message and runs the /say command

func Start

func Start() error

Start turns on the EC2 instance

func StartPixelmon

func StartPixelmon() error

StartPixelmon turns on the Pixelmon Minecraft service

func Stop

func Stop() error

Stop turns off the EC2 instance

func StopPixelmon

func StopPixelmon() error

StopPixelmon turns off the Pixelmon Minecraft service

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL