mcpyproject / McPy

A open source Minecraft server written 100% in Python
GNU Affero General Public License v3.0
84 stars 15 forks source link

Add server_properties.yml #68

Closed hydrostaticcog closed 3 years ago

hydrostaticcog commented 3 years ago

Resolves #13

This PR aims to add a server_properties.yaml file to control port, host, server MOTD, maximum players allowed, and toggling the Blackfire Probe.

The default configuration is as follows:

port: 25565
ip: 127.0.0.1
motd: A Minecraft Server
use_blackfire: false
max_players: 20

I found that the set_max_players function was not added to set the maximum number of players, so I added it given the importance of it to the config file.

I also fixed some typos (capitalized .blocks.Materials) in WorldIO.py and a logging inconsistency with debug mode, and I added #46 reincarnated (uses releases.json to set minecraft:brand data).

Geolykt commented 3 years ago

The code looks good to me now, I'll test it later in real use and see whether it works

hydrostaticcog commented 3 years ago

Ah, need to put yaml module in requirements.txt. Ig 0/0 did not add it when he added the configparser.

hydrostaticcog commented 3 years ago

Named server_properties.yaml after @Geolykt 's review.