Skip to content

Commit

Permalink
fix: inverted isEmpty method on ComponentStyle
Browse files Browse the repository at this point in the history
Fixes SpigotMC#3610
Relates to SpigotMC#3569 and 737d545
  • Loading branch information
diogotcorreia committed Feb 1, 2024
1 parent 02c5c1e commit e00bf45
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions chat/src/main/java/net/md_5/bungee/api/chat/ComponentStyle.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ public Boolean isObfuscatedRaw()
}

/**
* Returns whether this style has any formatting explicitly set.
* Returns whether this style has no formatting explicitly set.
*
* @return true if at least one value is set, false if none are set
* @return true if no value is set, false if at least one is set
*/
public boolean isEmpty()
{
return color != null || font != null || bold != null
|| italic != null || underlined != null
|| strikethrough != null || obfuscated != null;
return color == null && font == null && bold == null
&& italic == null && underlined == null
&& strikethrough == null && obfuscated == null;
}

@Override
Expand Down

0 comments on commit e00bf45

Please sign in to comment.