From 3df79981fda745a68883704400ba9c09e868b47a Mon Sep 17 00:00:00 2001 From: Chipmunk <65827213+ChipmunkMC@users.noreply.github.com> Date: Wed, 24 May 2023 20:49:35 -0400 Subject: [PATCH] Minor code improvement --- .../chipmunk/chipmunkbot/systemChat/KaboomChatParser.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/land/chipmunk/chipmunkbot/systemChat/KaboomChatParser.java b/src/main/java/land/chipmunk/chipmunkbot/systemChat/KaboomChatParser.java index bb64ef9..f7b0760 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/systemChat/KaboomChatParser.java +++ b/src/main/java/land/chipmunk/chipmunkbot/systemChat/KaboomChatParser.java @@ -20,8 +20,6 @@ public class KaboomChatParser implements SystemChatParser { public KaboomChatParser (ChipmunkBot client) { this.client = client; } - - private static Style empty = Style.empty(); private static Component SEPERATOR_COLON = Component.text(":"); private static Component SEPERATOR_SPACE = Component.space(); @@ -33,14 +31,14 @@ public class KaboomChatParser implements SystemChatParser { } public PlayerMessage parse (TranslatableComponent message) { - if (message.key().equals("%s") && message.args() != null && message.args().size() == 1 && message.style().equals(empty)) return parse(message.args().get(0)); + if (message.key().equals("%s") && message.args() != null && message.args().size() == 1 && message.style().isEmpty()) return parse(message.args().get(0)); return null; } public PlayerMessage parse (TextComponent message) { List children = message.children(); - if (!message.content().equals("") || !message.style().equals(empty) || children == null || children.size() < 3) return null; + if (!message.content().equals("") || !message.style().isEmpty() || children == null || children.size() < 3) return null; final Component prefix = children.get(0); Component displayName = Component.empty();