mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-11-29 05:26:19 +01:00
Null pointer fix.
This commit is contained in:
parent
710e1c3ff9
commit
88c36e11ab
@ -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()) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user