diff --git a/src/main/java/me/totalfreedom/tfguilds/listener/ChatListener.java b/src/main/java/me/totalfreedom/tfguilds/listener/ChatListener.java index 875e13b..bd3cc51 100644 --- a/src/main/java/me/totalfreedom/tfguilds/listener/ChatListener.java +++ b/src/main/java/me/totalfreedom/tfguilds/listener/ChatListener.java @@ -38,9 +38,15 @@ public class ChatListener implements Listener GuildRank rank = null; for (GuildRank r : guild.getRanks()) { - if (r.getMembers().contains(player.getUniqueId())) + if (r != null) { - rank = r; + if (r.getMembers() != null) + { + if (r.getMembers().contains(player.getUniqueId())) + { + rank = r; + } + } } }