Skip to content

Commit

Permalink
1.1.9 release: .schem schematic support
Browse files Browse the repository at this point in the history
  • Loading branch information
hevav committed Jan 26, 2023
1 parent 4c49eb4 commit 1be2687
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 23 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.8
1.1.9
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
}

setGroup("net.elytrium")
setVersion("1.1.8")
setVersion("1.1.9")

java {
setSourceCompatibility(JavaVersion.VERSION_11)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
19 changes: 1 addition & 18 deletions src/main/java/net/elytrium/limboauth/LimboAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@
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;
Expand Down Expand Up @@ -351,22 +349,7 @@ public void reload() {
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);
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/net/elytrium/limboauth/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
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;
Expand Down Expand Up @@ -151,8 +152,13 @@ public static class MAIN {
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;

Expand Down

0 comments on commit 1be2687

Please sign in to comment.