mcsmanager

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

mcsmanager

Fast and simple Minecraft server manager tool written in Go.

Report License

mcsmanager allows server administrators to easily start and manage Minecraft servers using simple commands and an easy-to-understand config.

Dependencies

Here are the dependencies you will need to run this tool:

  • tmux

If you want to build it for yourself, you will need:

  • Go

Installing

To download and install this using the Go tools, run go get github.com/EbonJaeger/mcsmanager/cmd/mcsmanager.

If you wish to build from source, run go install ./cmd/mcsmanager from the root of the project.

Usage

You can view the full help by running mcsmanager help.

mcsmanager CMD [args], where CMD is any one of:

  • attach|a : Open the server console
  • backup|b : Backup all server files into a .tar.gz archive
  • exec|e <args> : Executes a command in the Minecraft server, e.g. mcsmanager exec "say Hello there!". This can be used for automated messages before server restarts. :)
  • init|i <URL> : Initialize the setup for a Minecraft server. The tool will download the server jar for you, so you don't have to.
  • start|s : Start the Minecraft server
  • stop|t : Stop the Minecraft server
  • update|u <URL> OR <provider> <version> : Update the jar file for the Minecraft server. Currently, Paper is the only provider supported.

License

Copyright © 2019-2021 Evan Maddock (EbonJaeger)

mcsmanager is available under the terms of the Apache-2.0 license

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Archive added in v1.2.0

func Archive(path string, w *tar.Writer, exclusions ...string) error

Archive builds a tar archive of the given path.

We use the `filepath.Walk()` function to go through the entire file tree starting from the path that is passed in. This means we don't have to do a bunch of extra recursive logic for nested directories and having different code paths for files and directories.

func CountFiles added in v1.2.0

func CountFiles(path string, exclusions ...string) (count int, err error)

CountFiles walks a directory tree and counts all files present.

func Prune added in v1.2.0

func Prune(path string, maxFiles int, exemptions ...string) (total int, err error)

Prune will remove the oldest files in a directory until the number of files in the directory is one under the limit.

func PruneOld added in v1.2.0

func PruneOld(path string, maxAge int, exemptions ...string) (total int, err error)

PruneOld will delete files in the given directory if they were last modified after a certain period of time.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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