From 9bbd95cdbe808d464af160b06cdb9375f4edb606 Mon Sep 17 00:00:00 2001 From: Booquefius <49352026+Booquefius@users.noreply.github.com> Date: Sat, 16 Jul 2022 12:22:46 -0500 Subject: [PATCH 1/3] Update OnAuthStateChange.java --- .../lielamar/auth/bukkit/listeners/OnAuthStateChange.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/lielamar/auth/bukkit/listeners/OnAuthStateChange.java b/src/main/java/com/lielamar/auth/bukkit/listeners/OnAuthStateChange.java index 70d26fb..5c84320 100644 --- a/src/main/java/com/lielamar/auth/bukkit/listeners/OnAuthStateChange.java +++ b/src/main/java/com/lielamar/auth/bukkit/listeners/OnAuthStateChange.java @@ -37,8 +37,11 @@ public OnAuthStateChange(@NotNull TwoFactorAuthentication plugin) { @EventHandler public void onStateChange(PlayerStateChangeEvent event) { if (event.getNewAuthState().equals(AuthHandler.AuthState.AUTHENTICATED)) { - event.getPlayer().setFlySpeed((float) 0.1); - event.getPlayer().setWalkSpeed((float) 0.2); + + if (plugin.getConfig().getBoolean("change-walking-speed", false){ + event.getPlayer().setFlySpeed((float) 0.1); + event.getPlayer().setWalkSpeed((float) 0.2); + } this.plugin.getStorageHandler().setIP(event.getPlayer().getUniqueId(), this.hash.hash(event.getPlayer().getAddress().getAddress().getHostAddress())); From 21af34455ebf71052a7be8ec863a2b1dd7de163f Mon Sep 17 00:00:00 2001 From: Booquefius <49352026+Booquefius@users.noreply.github.com> Date: Sat, 16 Jul 2022 12:23:41 -0500 Subject: [PATCH 2/3] Update config.yml --- src/main/resources/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index f30c68c..335cd46 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -33,6 +33,9 @@ map-ids: [] # - NONE (no hash - not recommended!) ip-hash: SHA256 +# The player walk speed changes on joining +change-walking-speed: true + # How much delay should the plugin apply to loading players when the server reloads # This is useful when you have multiple databases with different latencies # You can use it to ensure your permissions plugin loads before the players are reloaded @@ -158,4 +161,4 @@ storage-data: # If you want to use a URI to connect to MongoDB, set the uri here. This will cause the plugin to ignore every other setting # Leave it empty if you don't want to use a URI. - mongodb-uri: "" \ No newline at end of file + mongodb-uri: "" From 359b0ee8936ad2ce0fb5dd4f863da4d8aa85de2e Mon Sep 17 00:00:00 2001 From: casper Date: Sat, 16 Jul 2022 21:00:51 -0500 Subject: [PATCH 3/3] Update OnAuthStateChange.java --- .../com/lielamar/auth/bukkit/listeners/OnAuthStateChange.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/lielamar/auth/bukkit/listeners/OnAuthStateChange.java b/src/main/java/com/lielamar/auth/bukkit/listeners/OnAuthStateChange.java index 5c84320..5cb8fc7 100644 --- a/src/main/java/com/lielamar/auth/bukkit/listeners/OnAuthStateChange.java +++ b/src/main/java/com/lielamar/auth/bukkit/listeners/OnAuthStateChange.java @@ -38,7 +38,7 @@ public OnAuthStateChange(@NotNull TwoFactorAuthentication plugin) { public void onStateChange(PlayerStateChangeEvent event) { if (event.getNewAuthState().equals(AuthHandler.AuthState.AUTHENTICATED)) { - if (plugin.getConfig().getBoolean("change-walking-speed", false){ + if (plugin.getConfig().getBoolean("change-walking-speed", false)) { event.getPlayer().setFlySpeed((float) 0.1); event.getPlayer().setWalkSpeed((float) 0.2); }