aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/elytrium/limboauth
diff options
context:
space:
mode:
authorPetr Ilin <hevav@hevav.dev>2022-04-14 16:48:23 +0300
committerPetr Ilin <hevav@hevav.dev>2022-04-14 16:48:51 +0300
commitfdaa89826db5e9f585c6c69e85624b0a449c5372 (patch)
tree5389d722c841ed7782cf86e2e3cf878fd5956690 /src/main/java/net/elytrium/limboauth
parent9997dcb54e8346d1e1937482630b94ed894eec2c (diff)
downloadLimboAuth-fdaa89826db5e9f585c6c69e85624b0a449c5372.tar.gz
LimboAuth-fdaa89826db5e9f585c6c69e85624b0a449c5372.tar.bz2
LimboAuth-fdaa89826db5e9f585c6c69e85624b0a449c5372.zip
Structure block (.nbt) schematic support
Diffstat (limited to 'src/main/java/net/elytrium/limboauth')
-rw-r--r--src/main/java/net/elytrium/limboauth/LimboAuth.java5
-rw-r--r--src/main/java/net/elytrium/limboauth/Settings.java6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java
index 329fcb7..fb2dd1d 100644
--- a/src/main/java/net/elytrium/limboauth/LimboAuth.java
+++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java
@@ -71,6 +71,7 @@ import net.elytrium.limboapi.api.LimboFactory;
import net.elytrium.limboapi.api.chunk.Dimension;
import net.elytrium.limboapi.api.chunk.VirtualWorld;
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;
@@ -262,6 +263,10 @@ public class LimboAuth {
file = new SchematicFile(path);
break;
}
+ case "structure": {
+ file = new StructureFile(path);
+ break;
+ }
default: {
this.getLogger().error("Incorrect world file type.");
this.server.shutdown();
diff --git a/src/main/java/net/elytrium/limboauth/Settings.java b/src/main/java/net/elytrium/limboauth/Settings.java
index badc906..6246444 100644
--- a/src/main/java/net/elytrium/limboauth/Settings.java
+++ b/src/main/java/net/elytrium/limboauth/Settings.java
@@ -111,9 +111,9 @@ public class Settings extends Config {
public String ALLOWED_NICKNAME_REGEX = "^[A-Za-z0-9_]{3,16}$";
public boolean LOAD_WORLD = false;
- @Comment("World file type: schematic")
- public String WORLD_FILE_TYPE = "schematic";
- public String WORLD_FILE_PATH = "world.schematic";
+ @Comment("World file type: schematic (1.12.2 and lower), structure block .nbt (saved in the latest version)")
+ public String WORLD_FILE_TYPE = "structure";
+ public String WORLD_FILE_PATH = "world.nbt";
@Comment({
"Custom isPremium URL",
"You can use Mojang one's API (set by default)",