diff options
author | Petr Ilin <hevav@hevav.dev> | 2023-01-02 22:26:02 +0300 |
---|---|---|
committer | Petr Ilin <hevav@hevav.dev> | 2023-01-02 22:26:02 +0300 |
commit | 711a554a773184610b183405276ccc516907d872 (patch) | |
tree | 8844bf48c8b7aa9cc3150d2cc7677c6dd0f9d183 | |
parent | 30ca033a92526e51c0763b5fe1da38a5b476c799 (diff) | |
download | LimboAuth-711a554a773184610b183405276ccc516907d872.tar.gz LimboAuth-711a554a773184610b183405276ccc516907d872.tar.bz2 LimboAuth-711a554a773184610b183405276ccc516907d872.zip |
disable-falling config option
-rw-r--r-- | build.gradle | 2 | ||||
-rw-r--r-- | src/main/java/net/elytrium/limboauth/Settings.java | 1 | ||||
-rw-r--r-- | src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java | 6 |
3 files changed, 7 insertions, 2 deletions
diff --git a/build.gradle b/build.gradle index 85701f6..2946a32 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ repositories { } dependencies { - compileOnly("net.elytrium:limboapi-api:1.0.7") + compileOnly("net.elytrium:limboapi-api:1.0.8-SNAPSHOT") compileOnly("com.velocitypowered:velocity-api:3.2.0-SNAPSHOT") compileOnly("com.velocitypowered:velocity-proxy:3.2.0-SNAPSHOT") // From Elytrium Repo. diff --git a/src/main/java/net/elytrium/limboauth/Settings.java b/src/main/java/net/elytrium/limboauth/Settings.java index 9f50164..29fa14b 100644 --- a/src/main/java/net/elytrium/limboauth/Settings.java +++ b/src/main/java/net/elytrium/limboauth/Settings.java @@ -140,6 +140,7 @@ public class Settings extends YamlConfig { @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"; public String WORLD_FILE_PATH = "world.nbt"; + public boolean DISABLE_FALLING = true; @Comment("World time in ticks (24000 ticks == 1 in-game day)") public long WORLD_TICKS = 1000L; diff --git a/src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java b/src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java index b459008..a3c4e6f 100644 --- a/src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java +++ b/src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java @@ -120,7 +120,11 @@ public class AuthSessionHandler implements LimboSessionHandler { this.player = player; this.ip = this.proxyPlayer.getRemoteAddress().getAddress().getHostAddress(); - this.player.disableFalling(); + if (Settings.IMP.MAIN.DISABLE_FALLING) { + this.player.disableFalling(); + } else { + this.player.enableFalling(); + } Serializer serializer = LimboAuth.getSerializer(); |