Skip to content

Commit a6e71b6

Browse files
hillttyJNNGL
andauthored
World Dimension Config (#6)
* world dimension config * fix * fix * another fix * Remove bin and .vscode * Fix indentation --------- Co-authored-by: JNNGL <jnngles@gmail.com>
1 parent b621ce7 commit a6e71b6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/main/java/ru/skywatcher_2019/limboreconnect/Config.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ public class Config extends YamlConfig {
4343
@Comment("Server status check timeout in milliseconds")
4444
public long PING_TIMEOUT = 500;
4545

46+
@Create
47+
public WORLD WORLD;
48+
49+
public static class WORLD {
50+
51+
@Comment(
52+
"Dimensions: OVERWORLD, NETHER, THE_END"
53+
)
54+
public String DIMENSION = "OVERWORLD";
55+
}
56+
4657
@Create
4758
public TITLE TITLE;
4859

src/main/java/ru/skywatcher_2019/limboreconnect/LimboReconnect.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public void reload() {
107107

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

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

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

0 commit comments

Comments
 (0)