Null pointer fix.

This commit is contained in:
cnaude 2015-08-27 13:46:15 -07:00
parent 710e1c3ff9
commit 88c36e11ab
2 changed files with 11 additions and 5 deletions

View File

@ -63,10 +63,12 @@ public class GamePlayerChatListener implements Listener {
plugin.logDebug("Ignore chat message due to event cancellation: " + event.getMessage());
return;
}
if (plugin.adminPrivateChatHook != null) {
if (event.isCancelled() && plugin.adminPrivateChatHook.ac.toggledPlayers.contains(event.getPlayer().getName())) {
plugin.logDebug("Ignore AdminChat message due to event cancellation: " + event.getMessage());
return;
}
}
if (event.getPlayer().hasPermission("irc.message.gamechat")) {
plugin.logDebug("Player " + event.getPlayer().getName() + " has permission irc.message.gamechat");
for (PurpleBot ircBot : plugin.ircBots.values()) {

View File

@ -41,7 +41,11 @@ public class GriefPreventionHook {
public boolean isMuted(Player player) {
plugin.logDebug("GriefPrevention: " + player.getDisplayName());
if (gp != null) {
try {
return gp.dataStore.isSoftMuted(player.getUniqueId());
} catch (Exception ex) {
plugin.logError(ex.getMessage());
}
}
return false;
}