From e15953918dfa84eda4f4d7204ef6eda25fc25491 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Tue, 26 Sep 2023 18:06:13 +0700 Subject: [PATCH] reset on authenticated --- .../land/chipmunk/chipmunkmod/modules/ChomeNSAuth.java | 2 ++ .../java/land/chipmunk/chipmunkmod/modules/CustomChat.java | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/land/chipmunk/chipmunkmod/modules/ChomeNSAuth.java b/src/main/java/land/chipmunk/chipmunkmod/modules/ChomeNSAuth.java index ff4875c..264ea4d 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/ChomeNSAuth.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/ChomeNSAuth.java @@ -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(); } } diff --git a/src/main/java/land/chipmunk/chipmunkmod/modules/CustomChat.java b/src/main/java/land/chipmunk/chipmunkmod/modules/CustomChat.java index 5ec5fec..b3a8fd5 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/CustomChat.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/CustomChat.java @@ -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; }