Skip to content

Commit

Permalink
Fix possible NPE when a player isn't fully joined yet
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoenix616 committed Apr 13, 2016
1 parent ede5185 commit bc134a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/zaiyers/Channels/Channel.java
Expand Up @@ -114,7 +114,7 @@ public void send(ChannelMessage message) {
if (receiver.getIgnores().contains(sender.getPlayer().getUniqueId().toString())) {
// I don't want to read this message
continue;
} else if (!cfg.isGlobal() && !receiver.hasPermission(this, "globalread") && !cfg.getServers().contains(receiver.getPlayer().getServer().getInfo().getName())) {
} else if (!cfg.isGlobal() && !receiver.hasPermission(this, "globalread") && receiver.getPlayer().getServer() != null && !cfg.getServers().contains(receiver.getPlayer().getServer().getInfo().getName())) {
// channel is not distributed to this player's server
continue;
}
Expand Down

0 comments on commit bc134a2

Please sign in to comment.