From 1bb3ddb0ee7782a8ffd2d86f4e6321c495fbffd7 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Mon, 19 Dec 2016 20:25:29 +0100 Subject: [PATCH] Fixed the Legendosh bug again Fixed NPE at getFlairState() --- src/main/java/buttondevteam/chat/ChatPlayer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/buttondevteam/chat/ChatPlayer.java b/src/main/java/buttondevteam/chat/ChatPlayer.java index a23850e..8d6aa81 100644 --- a/src/main/java/buttondevteam/chat/ChatPlayer.java +++ b/src/main/java/buttondevteam/chat/ChatPlayer.java @@ -38,7 +38,10 @@ public class ChatPlayer extends TBMCPlayer { } public FlairStates getFlairState() { - return getEnumData(FlairStates.class); + FlairStates data = getEnumData(FlairStates.class); + if (data == null) + setFlairState(data = FlairStates.NoComment); + return data; } public void setFlairState(FlairStates state) {