Skip to content

Commit

Permalink
World Dimension Config (#6)
Browse files Browse the repository at this point in the history
* world dimension config

* fix

* fix

* another fix

* Remove bin and .vscode

* Fix indentation

---------

Co-authored-by: JNNGL <[email protected]>
  • Loading branch information
hilltty and JNNGL authored Feb 3, 2023
1 parent b621ce7 commit a6e71b6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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

0 comments on commit a6e71b6

Please sign in to comment.