ProtocolLib

3M Downloads

Colored Scoreboard Teams 1.16

janLindner opened this issue ยท 2 comments

commented

Describe the question
The ChatColor Enum has been replaced by a standard class. Previously you were able to write and read the team color as a ChatColor. Is there currently any alternative to color teams with packets ?

Previously used Code

    public ChatColor getColor() {
        return getPacket().getEnumModifier(ChatColor.class, MinecraftReflection.getMinecraftClass("EnumChatFormat"))
            .read(0);
    }
   
    public void setColor(@NotNull final ChatColor value) {
        getPacket().getEnumModifier(ChatColor.class, MinecraftReflection.getMinecraftClass("EnumChatFormat"))
            .write(0, value);
    }
commented

Bump! Is there a solution for this issue? ChatColor has been deprecated by Paper.

commented

Relates to #735