config: add view-distance
This commit is contained in:
@@ -15,6 +15,7 @@ public class Config {
|
||||
|
||||
private final Server server = new Server();
|
||||
private final Players players = new Players();
|
||||
private final World world = new World();
|
||||
|
||||
private String motd;
|
||||
private String disconnectReason;
|
||||
@@ -35,4 +36,11 @@ public class Config {
|
||||
private int maxOnlile;
|
||||
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.players().maxOnlile(fromYamlPath("players/max-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))) {
|
||||
config.iconPath(Paths.get(fromYamlPath("icon/path", map, "favicon.png")));
|
||||
|
||||
@@ -15,4 +15,7 @@ players:
|
||||
# Размер значка: 64x64 px
|
||||
icon:
|
||||
enable: false
|
||||
path: favicon.png
|
||||
path: favicon.png
|
||||
|
||||
world:
|
||||
view-distance: 1
|
||||
Reference in New Issue
Block a user