Fix 1.7.10 compat: use org.bukkit.ChatColor#75
Merged
Conversation
Spigot 1.7.10 does not ship net.md_5.bungee.api.ChatColor, causing NoClassDefFoundError at plugin load. Swap the import to org.bukkit.ChatColor in the three affected files — all usages are plain color/format enum references (GRAY, YELLOW, STRIKETHROUGH, etc.) which exist in both classes and have identical toString() output on concatenation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
net.md_5.bungee.api.ChatColorexistiert in Spigot 1.7.10 nicht — Plugin-Load crasht mitNoClassDefFoundErrorinPowerBoard.<clinit>.Alle 3 Verwendungsstellen nutzen ausschließlich Standard-Farb-Enums (GRAY, YELLOW, RED, GOLD, DARK_AQUA, DARK_GRAY, GREEN, STRIKETHROUGH). Die sind in
org.bukkit.ChatColorgenauso vorhanden, und bei String-Konkatenation produzieren beide dasselbe§XColor-Code-Format.Diff
PowerBoard.javaPowerBoardCommand.javaConfig.javaJeweils nur der Import von
net.md_5.bungee.api.ChatColor→org.bukkit.ChatColor.Hinweise
ChatColor.of(...)Nutzungen im Code, daher 1:1 sicherTest plan
Buildläuft grünNoClassDefFoundError🤖 Generated with Claude Code