forked from ChomeNS/chipmunkmod
Made RainbowName not use /username and teams
This commit is contained in:
parent
09749e3725
commit
914c9d9075
1 changed files with 0 additions and 16 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue