from typing import Literal # Port of minecraft HTTP whitelist server http_port = 25564 # pipe - https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#StandardInput= # rcon - https://minecraft.fandom.com/wiki/Server.properties#enable-rcon whitelist_access_type: Literal["pipe", "rcon"] = "rcon" # Path to whitelist.json file # Usually located in the root of the minecraft server folder whitelist_file_path = "~/minecraft/whitelist.json" # Enabled endpoints # GET - get users in the whitelist # POST - add user to the whitelist # DELETE - delete user from the whitelist enabled_endpoints: set[Literal["GET", "POST", "DELETE"]] = { "GET", "POST", # "DELETE", } if whitelist_access_type == "pipe": # Path to PIPE file pipe_path = "~/minecraft/console" elif whitelist_access_type == "rcon": # RCON server port - https://minecraft.fandom.com/wiki/Server.properties#rcon.port rcon_port = 25575 # RCON server password - https://minecraft.fandom.com/wiki/Server.properties#rcon.password rcon_password = "password" else: raise ValueError("Unsupported access type")