Skip to content

Commit

Permalink
[Code style] Replace uses of EnumChatFormat for color codes with the …
Browse files Browse the repository at this point in the history
…codes directly
  • Loading branch information
NEZNAMY committed Jan 2, 2025
1 parent af0151f commit 296191b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ public ChatModifier(@NotNull ChatModifier modifier) {
@NotNull
public String getMagicCodes() {
StringBuilder builder = new StringBuilder();
if (bold) builder.append(EnumChatFormat.BOLD);
if (italic) builder.append(EnumChatFormat.ITALIC);
if (obfuscated) builder.append(EnumChatFormat.OBFUSCATED);
if (strikethrough) builder.append(EnumChatFormat.STRIKETHROUGH);
if (underlined) builder.append(EnumChatFormat.UNDERLINE);
if (bold) builder.append("§l");
if (italic) builder.append("§o");
if (obfuscated) builder.append("§k");
if (strikethrough) builder.append("§m");
if (underlined) builder.append("§n");
return builder.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import me.neznamy.tab.platforms.velocity.hook.VelocityPremiumVanishHook;
import me.neznamy.tab.shared.TAB;
import me.neznamy.tab.shared.TabConstants;
import me.neznamy.tab.shared.chat.EnumChatFormat;
import me.neznamy.tab.shared.chat.TabComponent;
import me.neznamy.tab.shared.features.injection.PipelineInjector;
import me.neznamy.tab.shared.features.redis.RedisSupport;
Expand Down Expand Up @@ -82,7 +81,7 @@ public VelocityPlatform(@NotNull VelocityTAB plugin) {
// Scoreboard API failed to enable due to an error
}
} else {
logInfo(TabComponent.fromColoredText(EnumChatFormat.RED + "As of version 5.0.0, TAB no longer uses TAB-Bridge to encode scoreboard packets on Velocity. " +
logInfo(TabComponent.fromColoredText("&cAs of version 5.0.0, TAB no longer uses TAB-Bridge to encode scoreboard packets on Velocity. " +
"Instead, it uses a custom made plugin that adds scoreboard API directly to Velocity, which offers better performance and reliability. " +
"You can download the plugin from https://github.com/NEZNAMY/VelocityScoreboardAPI/releases/. " +
"Until then, the following features will not work: scoreboard-teams, belowname-objective, playerlist-objective, scoreboard"));
Expand Down

0 comments on commit 296191b

Please sign in to comment.