From c61c2d808711100d3b1af5689f5b1932e72f10ac Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sun, 25 Aug 2024 15:34:07 +0200 Subject: [PATCH 1/2] Fix output on to small/large speed value --- .../src/de/steamwar/bausystem/features/util/SpeedCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java index 31308830..b73f68d5 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java @@ -41,9 +41,9 @@ public class SpeedCommand extends SWCommand { public void speedCommand(Player p, float speed) { speed = speed / 10F; if (speed < -1F) { - BauSystem.MESSAGE.send("SPEED_TOO_SMALL", p, speed); + BauSystem.MESSAGE.send("SPEED_TOO_SMALL", p, speed * 10); } else if (speed > 1F) { - BauSystem.MESSAGE.send("SPEED_TOO_HIGH", p, speed); + BauSystem.MESSAGE.send("SPEED_TOO_HIGH", p, speed * 10); } else { p.setFlySpeed(speed); p.setWalkSpeed(Math.min(speed + 0.1F, 1F)); From 9e2f2748b67b8c688a3b3b623c3d420773aaaade Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Mon, 26 Aug 2024 07:42:47 +0200 Subject: [PATCH 2/2] BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java aktualisiert --- .../steamwar/bausystem/features/util/SpeedCommand.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java index b73f68d5..c8a6d2de 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java @@ -39,12 +39,12 @@ public class SpeedCommand extends SWCommand { @Register public void speedCommand(Player p, float speed) { - speed = speed / 10F; - if (speed < -1F) { - BauSystem.MESSAGE.send("SPEED_TOO_SMALL", p, speed * 10); - } else if (speed > 1F) { - BauSystem.MESSAGE.send("SPEED_TOO_HIGH", p, speed * 10); + if (speed < -10F) { + BauSystem.MESSAGE.send("SPEED_TOO_SMALL", p, speed); + } else if (speed > 10F) { + BauSystem.MESSAGE.send("SPEED_TOO_HIGH", p, speed); } else { + speed = speed / 10F; p.setFlySpeed(speed); p.setWalkSpeed(Math.min(speed + 0.1F, 1F)); BauSystem.MESSAGE.send("SPEED_CURRENT", p, (p.getFlySpeed() * 10F));