Added more config.
This commit is contained in:
parent
6950d40bfd
commit
758372108b
|
@ -1,2 +1,9 @@
|
||||||
# ace-of-shades-2
|
# ace-of-shades-2
|
||||||
A simple 3D voxel-based shooter inspired by Ace of Spades.
|
A simple 3D voxel-based shooter inspired by Ace of Spades.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
Both the client and server use a similar style of YAML-based configuration, where upon booting up, the program will look for a configuration file in the current working directory with one of the following names: `configuration`, `config`, `cfg`, ending in either `.yaml` or `.yml`. Alternatively, you can provide the path to a configuration file at a different location via a single command-line argument. For example:
|
||||||
|
```bash
|
||||||
|
java -jar server.jar /path/to/my/custom/config.yaml
|
||||||
|
```
|
||||||
|
If no configuration file is found, and none is explicitly provided, then a set of default configuration options is loaded.
|
||||||
|
|
|
@ -49,6 +49,8 @@ public final class Config {
|
||||||
|
|
||||||
public static List<Path> getCommonConfigPaths() {
|
public static List<Path> getCommonConfigPaths() {
|
||||||
List<Path> paths = new ArrayList<>();
|
List<Path> paths = new ArrayList<>();
|
||||||
|
paths.add(Path.of("configuration.yaml"));
|
||||||
|
paths.add(Path.of("configuration.yml"));
|
||||||
paths.add(Path.of("config.yaml"));
|
paths.add(Path.of("config.yaml"));
|
||||||
paths.add(Path.of("config.yml"));
|
paths.add(Path.of("config.yml"));
|
||||||
paths.add(Path.of("cfg.yaml"));
|
paths.add(Path.of("cfg.yaml"));
|
||||||
|
|
Loading…
Reference in New Issue