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 | |
parent | 75e4380dd19610eaeaac7787dce5ba9461c12350 (diff) | |
download | LimboAuth-54f8cd8b21988e31e0569b1eea1ed0f6e46c57ce.tar.gz LimboAuth-54f8cd8b21988e31e0569b1eea1ed0f6e46c57ce.tar.bz2 LimboAuth-54f8cd8b21988e31e0569b1eea1ed0f6e46c57ce.zip |
Ability to change gamemode
-rw-r--r-- | build.gradle | 4 | ||||
-rw-r--r-- | src/main/java/net/elytrium/limboauth/LimboAuth.java | 2 | ||||
-rw-r--r-- | src/main/java/net/elytrium/limboauth/Settings.java | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/build.gradle b/build.gradle index 352ec43..4f1dccf 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ plugins { } setGroup("net.elytrium") -setVersion("1.0.5") +setVersion("1.0.6-SNAPSHOT") java { setSourceCompatibility(JavaVersion.VERSION_11) @@ -39,7 +39,7 @@ repositories { } dependencies { - compileOnly("net.elytrium:limboapi-api:1.0.5") + compileOnly("net.elytrium:limboapi-api:1.0.6-SNAPSHOT") compileOnly("com.velocitypowered:velocity-api:3.1.2-SNAPSHOT") annotationProcessor("com.velocitypowered:velocity-api:3.1.2-SNAPSHOT") 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)", |