mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-11-25 19:45:54 +01:00
Null pointer fix.
This commit is contained in:
parent
710e1c3ff9
commit
88c36e11ab
@ -63,9 +63,11 @@ public class GamePlayerChatListener implements Listener {
|
||||
plugin.logDebug("Ignore chat message due to event cancellation: " + event.getMessage());
|
||||
return;
|
||||
}
|
||||
if (event.isCancelled() && plugin.adminPrivateChatHook.ac.toggledPlayers.contains(event.getPlayer().getName())) {
|
||||
plugin.logDebug("Ignore AdminChat 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");
|
||||
|
@ -41,9 +41,13 @@ public class GriefPreventionHook {
|
||||
public boolean isMuted(Player player) {
|
||||
plugin.logDebug("GriefPrevention: " + player.getDisplayName());
|
||||
if (gp != null) {
|
||||
return gp.dataStore.isSoftMuted(player.getUniqueId());
|
||||
try {
|
||||
return gp.dataStore.isSoftMuted(player.getUniqueId());
|
||||
} catch (Exception ex) {
|
||||
plugin.logError(ex.getMessage());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user