reset on authenticated

This commit is contained in:
Chayapak 2023-09-26 18:06:13 +07:00
parent d931a8abd1
commit e15953918d
2 changed files with 5 additions and 4 deletions

View file

@ -73,5 +73,7 @@ public class ChomeNSAuth extends Listener {
System.out.println("Sending " + toSendString + " to " + selector);
CommandCore.INSTANCE.run("tellraw " + selector + " " + toSendString);
CustomChat.INSTANCE.resetTotal();
}
}

View file

@ -5,7 +5,6 @@ import com.google.gson.JsonElement;
import land.chipmunk.chipmunkmod.ChipmunkMod;
import land.chipmunk.chipmunkmod.commands.SayCommand;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
@ -49,7 +48,7 @@ public class CustomChat {
}
};
reset();
resetTotal();
timer = new Timer();
timer.schedule(task, 0, 50);
@ -60,11 +59,11 @@ public class CustomChat {
if (networkHandler != null) return;
reset();
resetTotal();
cleanup();
}
private void reset () {
public void resetTotal() {
total = 0;
}