From d90acb62e23f76b81aa676c275b1da9424dcd470 Mon Sep 17 00:00:00 2001 From: cswhite2000 <18whitechristop@gmail.com> Date: Sat, 16 Sep 2017 20:15:47 -0700 Subject: [PATCH] Don't attempt to display empty flairs --- .../main/java/tc/oc/commons/bukkit/flairs/FlairRenderer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/flairs/FlairRenderer.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/flairs/FlairRenderer.java index 67dd2a0..a83b821 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/flairs/FlairRenderer.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/flairs/FlairRenderer.java @@ -59,7 +59,7 @@ public class FlairRenderer implements PartialNameRenderer { return user.minecraft_flair() .stream() - .filter(flair -> realms.contains(flair.realm)) + .filter(flair -> realms.contains(flair.realm) && flair.text != null && !flair.text.isEmpty()) .sorted((flair1, flair2) -> flair1.priority - flair2.priority) .limit(flairConfiguration.maxFlairs() < 0 ? Long.MAX_VALUE : flairConfiguration.maxFlairs()) .sorted((flair1, flair2) -> flair2.priority - flair1.priority)