0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-19 17:02:13 +02:00

Add AntiAFK show wait time setting

This commit is contained in:
Alexander01998 2024-05-29 08:48:06 +02:00
parent 6359b40a89
commit 4181d5ac53

View File

@ -62,6 +62,10 @@ public final class AntiAfkHack extends Hack
0.5, 0, 60, 0.05,
ValueDisplay.DECIMAL.withPrefix("\u00b1").withSuffix("s"));
private final CheckboxSetting showWaitTime =
new CheckboxSetting("Show wait time",
"Displays the remaining wait time in the HackList.", true);
private int timer;
private Random random = Random.createLocal();
private BlockPos start;
@ -81,6 +85,16 @@ public final class AntiAfkHack extends Hack
addSetting(nonAiRange);
addSetting(waitTime);
addSetting(waitTimeRand);
addSetting(showWaitTime);
}
@Override
public String getRenderName()
{
if(showWaitTime.isChecked() && timer > 0)
return getName() + " [" + timer * 50 + "ms]";
return getName();
}
@Override