From 54f8cd8b21988e31e0569b1eea1ed0f6e46c57ce Mon Sep 17 00:00:00 2001 From: Petr Ilin Date: Sun, 12 Jun 2022 01:14:04 +0300 Subject: Ability to change gamemode --- src/main/java/net/elytrium/limboauth/LimboAuth.java | 2 ++ src/main/java/net/elytrium/limboauth/Settings.java | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'src/main/java/net') diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java index eb052fe..cc7c291 100644 --- a/src/main/java/net/elytrium/limboauth/LimboAuth.java +++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java @@ -77,6 +77,7 @@ 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.limboapi.api.player.GameMode; import net.elytrium.limboauth.command.ChangePasswordCommand; import net.elytrium.limboauth.command.DestroySessionCommand; import net.elytrium.limboauth.command.ForceChangePasswordCommand; @@ -351,6 +352,7 @@ public class LimboAuth { .createLimbo(authWorld) .setName("LimboAuth") .setWorldTime(Settings.IMP.MAIN.WORLD_TICKS) + .setGameMode(GameMode.valueOf(Settings.IMP.MAIN.GAME_MODE)) .registerCommand(new LimboCommandMeta(this.filterCommands(Settings.IMP.MAIN.REGISTER_COMMAND))) .registerCommand(new LimboCommandMeta(this.filterCommands(Settings.IMP.MAIN.LOGIN_COMMAND))) .registerCommand(new LimboCommandMeta(this.filterCommands(Settings.IMP.MAIN.TOTP_COMMAND))); diff --git a/src/main/java/net/elytrium/limboauth/Settings.java b/src/main/java/net/elytrium/limboauth/Settings.java index a6f188a..775976f 100644 --- a/src/main/java/net/elytrium/limboauth/Settings.java +++ b/src/main/java/net/elytrium/limboauth/Settings.java @@ -128,6 +128,10 @@ public class Settings extends YamlConfig { @Comment("World time in ticks (24000 ticks == 1 in-game day)") public long WORLD_TICKS = 1000L; + + @Comment("Available: ADVENTURE, CREATIVE, SURVIVAL, SPECTATOR") + public String GAME_MODE = "ADVENTURE"; + @Comment({ "Custom isPremium URL", "You can use Mojang one's API (set by default)", -- cgit