Skip to content

Commit

Permalink
[Bukkit] Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
NEZNAMY committed Feb 6, 2025
1 parent 6a5cee8 commit ab3bd61
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,9 @@ public Object convert(@NotNull TabComponent component) {

@SneakyThrows
private Object convertStyle(@NotNull ChatModifier modifier) {
Object color = modifier.getColor() == null ? null : ChatHexColor_fromRGB.invoke(null, modifier.getColor().getRgb());
if (BukkitReflection.is1_21_4Plus()) {
return newChatModifier.newInstance(
color,
modifier.getColor() == null ? null : ChatHexColor_fromRGB.invoke(null, modifier.getColor().getRgb()),
modifier.getShadowColor(),
modifier.getBold(),
modifier.getItalic(),
Expand All @@ -145,7 +144,7 @@ private Object convertStyle(@NotNull ChatModifier modifier) {
);
} else if (BukkitReflection.getMinorVersion() >= 16) {
return newChatModifier.newInstance(
color,
modifier.getColor() == null ? null : ChatHexColor_fromRGB.invoke(null, modifier.getColor().getRgb()),
modifier.getBold(),
modifier.getItalic(),
modifier.getItalic(),
Expand Down

0 comments on commit ab3bd61

Please sign in to comment.