diff options
author | Petr Ilin <hevav@hevav.dev> | 2022-06-12 01:14:04 +0300 |
---|---|---|
committer | Petr Ilin <hevav@hevav.dev> | 2022-06-12 01:14:04 +0300 |
commit | 54f8cd8b21988e31e0569b1eea1ed0f6e46c57ce (patch) | |
tree | b7e1c7f00731ed5676bd8d2ab407c3a2ff5c69a4 /src/main/java/net | |
parent | 75e4380dd19610eaeaac7787dce5ba9461c12350 (diff) | |
download | LimboAuth-54f8cd8b21988e31e0569b1eea1ed0f6e46c57ce.tar.gz LimboAuth-54f8cd8b21988e31e0569b1eea1ed0f6e46c57ce.tar.bz2 LimboAuth-54f8cd8b21988e31e0569b1eea1ed0f6e46c57ce.zip |
Ability to change gamemode
Diffstat (limited to 'src/main/java/net')
-rw-r--r-- | src/main/java/net/elytrium/limboauth/LimboAuth.java | 2 | ||||
-rw-r--r-- | src/main/java/net/elytrium/limboauth/Settings.java | 4 |
2 files changed, 6 insertions, 0 deletions
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)", |