aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Ilin <hevav@hevav.dev>2023-01-26 21:16:43 +0300
committerPetr Ilin <hevav@hevav.dev>2023-01-26 21:16:43 +0300
commit1be26878bb5be947d8a401bb62ae8b3eae503986 (patch)
tree6d1199f04e4644a346ca0a0441453a575dfc19ce
parent4c49eb400462a6d8f3910bbfa44bf9f575fa24f2 (diff)
downloadLimboAuth-1be26878bb5be947d8a401bb62ae8b3eae503986.tar.gz
LimboAuth-1be26878bb5be947d8a401bb62ae8b3eae503986.tar.bz2
LimboAuth-1be26878bb5be947d8a401bb62ae8b3eae503986.zip
1.1.9 release: .schem schematic support
-rw-r--r--VERSION2
-rw-r--r--build.gradle2
-rw-r--r--gradle.properties2
-rw-r--r--src/main/java/net/elytrium/limboauth/LimboAuth.java19
-rw-r--r--src/main/java/net/elytrium/limboauth/Settings.java10
5 files changed, 12 insertions, 23 deletions
diff --git a/VERSION b/VERSION
index 18efdb9..512a1fa 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.1.8
+1.1.9
diff --git a/build.gradle b/build.gradle
index 3983fa3..11881c2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -10,7 +10,7 @@ plugins {
}
setGroup("net.elytrium")
-setVersion("1.1.8")
+setVersion("1.1.9")
java {
setSourceCompatibility(JavaVersion.VERSION_11)
diff --git a/gradle.properties b/gradle.properties
index 414a011..cde59e7 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
-limboapiVersion=1.1.0
+limboapiVersion=1.1.4
velocityVersion=3.2.0-SNAPSHOT
nettyVersion=4.1.86.Final
floodgateVersion=2.1.1-SNAPSHOT
diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java
index 1dcd22b..de03a22 100644
--- a/src/main/java/net/elytrium/limboauth/LimboAuth.java
+++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java
@@ -87,8 +87,6 @@ import net.elytrium.limboapi.api.Limbo;
import net.elytrium.limboapi.api.LimboFactory;
import net.elytrium.limboapi.api.chunk.VirtualWorld;
import net.elytrium.limboapi.api.command.LimboCommandMeta;
-import net.elytrium.limboapi.api.file.SchematicFile;
-import net.elytrium.limboapi.api.file.StructureFile;
import net.elytrium.limboapi.api.file.WorldFile;
import net.elytrium.limboauth.command.ChangePasswordCommand;
import net.elytrium.limboauth.command.DestroySessionCommand;
@@ -351,22 +349,7 @@ public class LimboAuth {
if (Settings.IMP.MAIN.LOAD_WORLD) {
try {
Path path = this.dataDirectory.resolve(Settings.IMP.MAIN.WORLD_FILE_PATH);
- WorldFile file;
- switch (Settings.IMP.MAIN.WORLD_FILE_TYPE) {
- case "schematic": {
- file = new SchematicFile(path);
- break;
- }
- case "structure": {
- file = new StructureFile(path);
- break;
- }
- default: {
- LOGGER.error("Incorrect world file type.");
- this.server.shutdown();
- return;
- }
- }
+ WorldFile file = this.factory.openWorldFile(Settings.IMP.MAIN.WORLD_FILE_TYPE, path);
Settings.MAIN.WORLD_COORDS coords = Settings.IMP.MAIN.WORLD_COORDS;
file.toWorld(this.factory, authWorld, coords.X, coords.Y, coords.Z, Settings.IMP.MAIN.WORLD_LIGHT_LEVEL);
diff --git a/src/main/java/net/elytrium/limboauth/Settings.java b/src/main/java/net/elytrium/limboauth/Settings.java
index 17d5782..68bbe17 100644
--- a/src/main/java/net/elytrium/limboauth/Settings.java
+++ b/src/main/java/net/elytrium/limboauth/Settings.java
@@ -27,6 +27,7 @@ import net.elytrium.commons.config.ConfigSerializer;
import net.elytrium.commons.config.YamlConfig;
import net.elytrium.commons.kyori.serialization.Serializers;
import net.elytrium.limboapi.api.chunk.Dimension;
+import net.elytrium.limboapi.api.file.BuiltInWorldFileType;
import net.elytrium.limboapi.api.player.GameMode;
import net.elytrium.limboauth.command.CommandPermissionState;
import net.elytrium.limboauth.dependencies.DatabaseLibrary;
@@ -151,8 +152,13 @@ public class Settings extends YamlConfig {
public String ALLOWED_NICKNAME_REGEX = "^[A-Za-z0-9_]{3,16}$";
public boolean LOAD_WORLD = false;
- @Comment("World file type: \"schematic\" (1.12.2 and lower, not recommended), \"structure\" block .nbt (any Minecraft version is supported, but the latest one is recommended).")
- public String WORLD_FILE_TYPE = "structure";
+ @Comment({
+ "World file type:",
+ " SCHEMATIC (MCEdit .schematic, 1.12.2 and lower, not recommended)",
+ " STRUCTURE (structure block .nbt, any Minecraft version is supported, but the latest one is recommended).",
+ " WORLDEDIT_SCHEM (WorldEdit .schem, any Minecraft version is supported, but the latest one is recommended)."
+ })
+ public BuiltInWorldFileType WORLD_FILE_TYPE = BuiltInWorldFileType.STRUCTURE;
public String WORLD_FILE_PATH = "world.nbt";
public boolean DISABLE_FALLING = true;