config: add view-distance
This commit is contained in:
@@ -15,6 +15,7 @@ public class Config {
|
|||||||
|
|
||||||
private final Server server = new Server();
|
private final Server server = new Server();
|
||||||
private final Players players = new Players();
|
private final Players players = new Players();
|
||||||
|
private final World world = new World();
|
||||||
|
|
||||||
private String motd;
|
private String motd;
|
||||||
private String disconnectReason;
|
private String disconnectReason;
|
||||||
@@ -35,4 +36,11 @@ public class Config {
|
|||||||
private int maxOnlile;
|
private int maxOnlile;
|
||||||
private int onlile;
|
private int onlile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
public static class World {
|
||||||
|
private int viewDistance;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ public class ConfigModule {
|
|||||||
config.disconnectReason(fromYamlPath("disconnect-reason", map, ""));
|
config.disconnectReason(fromYamlPath("disconnect-reason", map, ""));
|
||||||
config.players().maxOnlile(fromYamlPath("players/max-online", map, 0));
|
config.players().maxOnlile(fromYamlPath("players/max-online", map, 0));
|
||||||
config.players().onlile(fromYamlPath("players/online", map, 0));
|
config.players().onlile(fromYamlPath("players/online", map, 0));
|
||||||
|
config.world().viewDistance(fromYamlPath("world/view-distance", map, 0));
|
||||||
|
|
||||||
if (Boolean.TRUE.equals(fromYamlPath("icon/enable", map, false))) {
|
if (Boolean.TRUE.equals(fromYamlPath("icon/enable", map, false))) {
|
||||||
config.iconPath(Paths.get(fromYamlPath("icon/path", map, "favicon.png")));
|
config.iconPath(Paths.get(fromYamlPath("icon/path", map, "favicon.png")));
|
||||||
|
|||||||
@@ -16,3 +16,6 @@ players:
|
|||||||
icon:
|
icon:
|
||||||
enable: false
|
enable: false
|
||||||
path: favicon.png
|
path: favicon.png
|
||||||
|
|
||||||
|
world:
|
||||||
|
view-distance: 1
|
||||||
Reference in New Issue
Block a user