From 914c9d9075b2f8e65b7376ad2f26828f5db34454 Mon Sep 17 00:00:00 2001 From: blackilykat Date: Sun, 4 Jun 2023 16:09:06 +0200 Subject: [PATCH] Made RainbowName not use /username and teams --- .../chipmunkmod/modules/RainbowName.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/main/java/land/chipmunk/chipmunkmod/modules/RainbowName.java b/src/main/java/land/chipmunk/chipmunkmod/modules/RainbowName.java index 160d909..078f5e0 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/RainbowName.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/RainbowName.java @@ -25,7 +25,6 @@ public class RainbowName { @Getter @Setter private boolean enabled = false; - private String[] team; @Getter @Setter private String displayName; @@ -90,24 +89,10 @@ public class RainbowName { } public void enable () { - final String[] colorCodes = generateColorCodes(8); - client.getNetworkHandler().sendChatCommand("extras:username " + generateUsername(colorCodes)); - - team = generateTeamName(); - - CommandCore.INSTANCE.run("minecraft:team add " + String.join("", team)); - - CommandCore.INSTANCE.run("minecraft:execute as " + client.getNetworkHandler().getProfile().getId() + " run team join " + String.join("", team)); - enabled = true; } public void disable () { - client.getNetworkHandler().sendChatCommand("extras:username " + client.getSession().getUsername()); - - CommandCore.INSTANCE.run("minecraft:team remove " + String.join("", team)); - team = null; - CommandCore.INSTANCE.run("essentials:nick " + client.getSession().getUsername() + " off"); enabled = false; @@ -142,7 +127,6 @@ public class RainbowName { hue = (hue + increment) % 360; } - CommandCore.INSTANCE.run("minecraft:team modify " + String.join("", team) + " prefix " + GsonComponentSerializer.gson().serialize(component)); CommandCore.INSTANCE.run("essentials:nick " + client.getSession().getUsername() + " " + essentialsNickname); startHue = (startHue + increment) % 360;