fixed acinform not working with floating point numbers
This commit is contained in:
parent
e36256d5be
commit
a33ee357e8
@ -18,7 +18,7 @@ public class AcInform extends Appliance {
|
|||||||
String anticheatName = null;
|
String anticheatName = null;
|
||||||
String playerName = null;
|
String playerName = null;
|
||||||
String checkName = null;
|
String checkName = null;
|
||||||
Integer violationCount = null;
|
Float violationCount = null;
|
||||||
|
|
||||||
for(int i = 0; i < args.length; i++) {
|
for(int i = 0; i < args.length; i++) {
|
||||||
if(!args[i].startsWith("--")) continue;
|
if(!args[i].startsWith("--")) continue;
|
||||||
@ -30,14 +30,14 @@ public class AcInform extends Appliance {
|
|||||||
case "--anticheatName" -> anticheatName = nextArgument;
|
case "--anticheatName" -> anticheatName = nextArgument;
|
||||||
case "--playerName" -> playerName = nextArgument;
|
case "--playerName" -> playerName = nextArgument;
|
||||||
case "--check" -> checkName = nextArgument;
|
case "--check" -> checkName = nextArgument;
|
||||||
case "--violationCount" -> violationCount = Integer.valueOf(nextArgument);
|
case "--violationCount" -> violationCount = Float.valueOf(nextArgument);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.notifyAdmins(anticheatName, playerName, checkName, violationCount);
|
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<TextComponent, TextComponent.Builder> component = Component.text();
|
ComponentBuilder<TextComponent, TextComponent.Builder> component = Component.text();
|
||||||
Component prefix = Component.text("# ", NamedTextColor.DARK_RED);
|
Component prefix = Component.text("# ", NamedTextColor.DARK_RED);
|
||||||
NamedTextColor textColor = NamedTextColor.GRAY;
|
NamedTextColor textColor = NamedTextColor.GRAY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user