Fix improper bitwise logic in DiscordUtil#getRoleColorFormat

This commit is contained in:
Josh Roy 2021-07-05 13:31:49 -04:00
parent b516db669c
commit feed2d6a45

View File

@ -144,11 +144,10 @@ public final class DiscordUtil {
* @return The bukkit color code or blank string.
*/
public static String getRoleColorFormat(Member member) {
final int rawColor = member.getColorRaw();
if (rawColor == Role.DEFAULT_COLOR_RAW) {
if (member.getColorRaw() == Role.DEFAULT_COLOR_RAW) {
return "";
}
final int rawColor = 0xff000000 | member.getColorRaw();
if (VersionUtil.getServerBukkitVersion().isHigherThanOrEqualTo(VersionUtil.v1_16_1_R01)) {
// Essentials' FormatUtil allows us to not have to use bungee's chatcolor since bukkit's own one doesn't support rgb