Categorygithub.com/Coderlane/go-minecraft-config
modulepackage
0.0.0-20210204013314-ccec2f678428
Repository: https://github.com/coderlane/go-minecraft-config.git
Documentation: pkg.go.dev

# README

go-minecraft-config

CI codecov

This repository contains simple golang structs for Minecraft config files.

This supports loading: server.properties, banned-ips.json, banned-players.json, ops.json, and whitelist.json.

# Functions

LoadAllowUserList loads `whitelist.json`.
LoadConfig loads server config from the provided directory.
LoadDenyIPList loads `banned-ips.json`.
LoadDenyUserList loads `banned-players.json`.
LoadOperatorUserList loads `pos.json`.

# Constants

MinecraftAllowUserFile maps to `whitelist.json`.
MinecraftConfigFile maps to `server.properties`.
MinecraftDenyIPFile maps to `banned-ips.json`.
MinecraftDenyUserFile maps to `banned-players.json`.
MinecraftOperatorUserFile maps to `ops.json`.

# Structs

Config represents the Minecraft server config.
Deny represents why a `User` or `net.IP` was denied access to a server.
DenyIP represents why a `net.IP` was denied access to a server.
DenyUser represents why a `User` was denied access to a server.
MinecraftTime is a JSON representation of time in Minecraft.
OperatorUser represents an operator in the OperatorUserList.
User represents a minecraft user.

# Type aliases

AllowUserList represents a list of users allowed to join a minecraft server.
DenyIPList represents a list of `net.IP` that were banned from a server and why.
DenyUserList represents a list of `User` that were banned from a server and why.
OperatorUserList represents a list of operators of a minecraft server IE: The list of operators from `ops.json`.