From b6b5a5bbfe3585ef7f3b758c658c3a9e2bce0d39 Mon Sep 17 00:00:00 2001 From: hilltty Date: Fri, 3 Feb 2023 05:00:06 +0200 Subject: [PATCH 1/6] world dimension config --- .vscode/settings.json | 3 +++ bin/default/velocity-plugin.json | 1 + .../ru/skywatcher_2019/limboreconnect/Config.java | 13 +++++++++++++ .../limboreconnect/LimboReconnect.java | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json create mode 100644 bin/default/velocity-plugin.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7b016a8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.compile.nullAnalysis.mode": "automatic" +} \ No newline at end of file diff --git a/bin/default/velocity-plugin.json b/bin/default/velocity-plugin.json new file mode 100644 index 0000000..3f230ff --- /dev/null +++ b/bin/default/velocity-plugin.json @@ -0,0 +1 @@ +{"id":"limboreconnect","name":"LimboReconnect","version":"1.1-SNAPSHOT","authors":["SkyWatcher_2019","hevav"],"dependencies":[],"main":"ru.skywatcher_2019.limboreconnect.LimboReconnect"} \ No newline at end of file diff --git a/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java b/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java index cd7e008..47eafbe 100644 --- a/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java +++ b/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java @@ -43,6 +43,19 @@ public class Config extends YamlConfig { @Comment("Server status check timeout in milliseconds") public long PING_TIMEOUT = 500; + @Create + public Config.MAIN.WORLD WORLD; + + public static class WORLD { + + @Comment( + "Dimensions: OVERWORLD, NETHER, THE_END" + ) + public String DIMENSION = "OVERWORLD"; + } + + } + @Create public TITLE TITLE; diff --git a/src/main/java/ru/skywatcher_2019/limboreconnect/LimboReconnect.java b/src/main/java/ru/skywatcher_2019/limboreconnect/LimboReconnect.java index 8a80675..80d2a06 100644 --- a/src/main/java/ru/skywatcher_2019/limboreconnect/LimboReconnect.java +++ b/src/main/java/ru/skywatcher_2019/limboreconnect/LimboReconnect.java @@ -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.MAIN.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); From a179dd9aa3b734606a6a7cce1eb25acaf80d03c4 Mon Sep 17 00:00:00 2001 From: hilltty Date: Fri, 3 Feb 2023 05:09:58 +0200 Subject: [PATCH 2/6] fix --- src/main/java/ru/skywatcher_2019/limboreconnect/Config.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java b/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java index 47eafbe..2f73239 100644 --- a/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java +++ b/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java @@ -54,8 +54,6 @@ public static class WORLD { public String DIMENSION = "OVERWORLD"; } - } - @Create public TITLE TITLE; From f47f080d3730a087622858f8103b2bd8187c0ddf Mon Sep 17 00:00:00 2001 From: hilltty Date: Fri, 3 Feb 2023 05:11:23 +0200 Subject: [PATCH 3/6] fix --- src/main/java/ru/skywatcher_2019/limboreconnect/Config.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java b/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java index 2f73239..0e77053 100644 --- a/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java +++ b/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java @@ -44,7 +44,7 @@ public class Config extends YamlConfig { public long PING_TIMEOUT = 500; @Create - public Config.MAIN.WORLD WORLD; + public WORLD WORLD; public static class WORLD { From afda787abfd730a3bf02a1954f95b17748350bbe Mon Sep 17 00:00:00 2001 From: hilltty Date: Fri, 3 Feb 2023 05:16:42 +0200 Subject: [PATCH 4/6] another fix --- .../java/ru/skywatcher_2019/limboreconnect/LimboReconnect.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ru/skywatcher_2019/limboreconnect/LimboReconnect.java b/src/main/java/ru/skywatcher_2019/limboreconnect/LimboReconnect.java index 80d2a06..e83e1af 100644 --- a/src/main/java/ru/skywatcher_2019/limboreconnect/LimboReconnect.java +++ b/src/main/java/ru/skywatcher_2019/limboreconnect/LimboReconnect.java @@ -107,7 +107,7 @@ public void reload() { setSerializer(Config.IMP.SERIALIZER.getSerializer()); - VirtualWorld world = this.factory.createVirtualWorld(Dimension.valueOf(Config.IMP.MAIN.WORLD.DIMENSION), 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); From c96cb90dfb40c0bbdc1185ab7998b207e6bc450f Mon Sep 17 00:00:00 2001 From: JNNGL Date: Fri, 3 Feb 2023 20:30:16 +1100 Subject: [PATCH 5/6] Remove bin and .vscode --- .vscode/settings.json | 3 --- bin/default/velocity-plugin.json | 1 - 2 files changed, 4 deletions(-) delete mode 100644 .vscode/settings.json delete mode 100644 bin/default/velocity-plugin.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 7b016a8..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "java.compile.nullAnalysis.mode": "automatic" -} \ No newline at end of file diff --git a/bin/default/velocity-plugin.json b/bin/default/velocity-plugin.json deleted file mode 100644 index 3f230ff..0000000 --- a/bin/default/velocity-plugin.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"limboreconnect","name":"LimboReconnect","version":"1.1-SNAPSHOT","authors":["SkyWatcher_2019","hevav"],"dependencies":[],"main":"ru.skywatcher_2019.limboreconnect.LimboReconnect"} \ No newline at end of file From 463c89957d98056f27e4f1532672fc752e8962dd Mon Sep 17 00:00:00 2001 From: JNNGL Date: Fri, 3 Feb 2023 20:32:02 +1100 Subject: [PATCH 6/6] Fix indentation --- .../ru/skywatcher_2019/limboreconnect/Config.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java b/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java index 0e77053..3270e87 100644 --- a/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java +++ b/src/main/java/ru/skywatcher_2019/limboreconnect/Config.java @@ -44,15 +44,15 @@ public class Config extends YamlConfig { public long PING_TIMEOUT = 500; @Create - public WORLD WORLD; + public WORLD WORLD; - public static class WORLD { + public static class WORLD { - @Comment( - "Dimensions: OVERWORLD, NETHER, THE_END" - ) - public String DIMENSION = "OVERWORLD"; - } + @Comment( + "Dimensions: OVERWORLD, NETHER, THE_END" + ) + public String DIMENSION = "OVERWORLD"; + } @Create public TITLE TITLE;