From 0a4ab5a46ecd5e7d9e6061be36577cd80810eff2 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Fri, 16 Dec 2016 14:18:43 +0100 Subject: [PATCH] Fixed fix of NPE --- src/main/java/buttondevteam/chat/ChatPlayer.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/buttondevteam/chat/ChatPlayer.java b/src/main/java/buttondevteam/chat/ChatPlayer.java index fccb9bd..a23850e 100644 --- a/src/main/java/buttondevteam/chat/ChatPlayer.java +++ b/src/main/java/buttondevteam/chat/ChatPlayer.java @@ -2,13 +2,10 @@ package buttondevteam.chat; import java.util.ArrayList; import java.util.List; -import java.util.Optional; - import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.Player; -import buttondevteam.chat.formatting.ChatFormatter; import buttondevteam.lib.TBMCPlayer; import buttondevteam.lib.chat.*; @@ -22,9 +19,9 @@ public class ChatPlayer extends TBMCPlayer { } public List getUserNames() { - final List data = getData(); + List data = getData(); if (data == null) - setUserNames(new ArrayList()); + setUserNames(data = new ArrayList()); return data; }