Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

World Dimension Config #6

Merged
merged 6 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/java/ru/skywatcher_2019/limboreconnect/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ public class Config extends YamlConfig {
@Comment("Server status check timeout in milliseconds")
public long PING_TIMEOUT = 500;

@Create
public WORLD WORLD;

public static class WORLD {

@Comment(
"Dimensions: OVERWORLD, NETHER, THE_END"
)
public String DIMENSION = "OVERWORLD";
}

@Create
public TITLE TITLE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void reload() {

setSerializer(Config.IMP.SERIALIZER.getSerializer());

VirtualWorld world = this.factory.createVirtualWorld(Dimension.OVERWORLD, 0, 100, 0, (float) 90, (float) 0.0);
VirtualWorld world = this.factory.createVirtualWorld(Dimension.valueOf(Config.IMP.WORLD.DIMENSION), 0, 100, 0, (float) 90, (float) 0.0);
this.limbo = this.factory.createLimbo(world).setName("LimboReconnect").setWorldTime(6000);

this.offlineServerMessage = SERIALIZER.deserialize(Config.IMP.MESSAGES.SERVER_OFFLINE);
Expand Down