From a33ee357e84764a9932f65a40fb425bf957750f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20M=C3=BCller?= Date: Wed, 25 Dec 2024 23:06:15 +0100 Subject: [PATCH] fixed acinform not working with floating point numbers --- .../craftattack/spawn/appliances/acInform/AcInform.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/mhsl/craftattack/spawn/appliances/acInform/AcInform.java b/src/main/java/eu/mhsl/craftattack/spawn/appliances/acInform/AcInform.java index 0b60aa7..e2bc871 100644 --- a/src/main/java/eu/mhsl/craftattack/spawn/appliances/acInform/AcInform.java +++ b/src/main/java/eu/mhsl/craftattack/spawn/appliances/acInform/AcInform.java @@ -18,7 +18,7 @@ public class AcInform extends Appliance { String anticheatName = null; String playerName = null; String checkName = null; - Integer violationCount = null; + Float violationCount = null; for(int i = 0; i < args.length; i++) { if(!args[i].startsWith("--")) continue; @@ -30,14 +30,14 @@ public class AcInform extends Appliance { case "--anticheatName" -> anticheatName = nextArgument; case "--playerName" -> playerName = nextArgument; case "--check" -> checkName = nextArgument; - case "--violationCount" -> violationCount = Integer.valueOf(nextArgument); + case "--violationCount" -> violationCount = Float.valueOf(nextArgument); } } this.notifyAdmins(anticheatName, playerName, checkName, violationCount); } - public void notifyAdmins(@Nullable String anticheatName, @Nullable String playerName, @Nullable String checkName, @Nullable Integer violationCount) { + public void notifyAdmins(@Nullable String anticheatName, @Nullable String playerName, @Nullable String checkName, @Nullable Float violationCount) { ComponentBuilder component = Component.text(); Component prefix = Component.text("# ", NamedTextColor.DARK_RED); NamedTextColor textColor = NamedTextColor.GRAY;