Fixed NPE when getting flairs

Side effect: reduced Legendosh bug to happen every 10 seconds. I suspect
the author variable is null
This commit is contained in:
alisolarflare 2016-12-15 18:58:18 -05:00
parent 64529eef73
commit 7b9aa332d8

View file

@ -141,7 +141,7 @@ public class PluginMain extends JavaPlugin { // Translated to Java: 2015.07.15.
if (PlayersWithFlairs.contains(ign))
continue;
try (ChatPlayer mp = TBMCPlayer.getFromName(ign).asPluginPlayer(ChatPlayer.class)) { // Loads player file
if (mp == null)
if (mp == null || mp.getUserNames() == null || author == null)
continue;
/*
* if (!JoinedBefore(mp, 2015, 6, 5)) continue;