mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-11-17 07:35:38 +01:00
Ignore AdminPrivateChat messages in mcMMO listeners.
This commit is contained in:
parent
b9d20c7c6e
commit
b09cf1804f
@ -42,6 +42,12 @@ public class McMMOChatListener implements Listener {
|
||||
public void onMcMMOChatEvent(McMMOChatEvent event) {
|
||||
String sender = event.getSender();
|
||||
Player player = plugin.getServer().getPlayer(sender);
|
||||
if (plugin.adminPrivateChatHook != null) {
|
||||
if (plugin.adminPrivateChatHook.ac.toggledPlayers.contains(player.getName())) {
|
||||
plugin.logDebug("[onMcMMOChatEvent]: Ignoring chat due to AdminPrivate chat message");
|
||||
return;
|
||||
}
|
||||
}
|
||||
plugin.logDebug("[onMcMMOChatEvent]: " + sender);
|
||||
if (player != null && !sender.isEmpty()) {
|
||||
if (player.hasPermission("irc.message.gamechat")) {
|
||||
@ -56,6 +62,12 @@ public class McMMOChatListener implements Listener {
|
||||
public void onMcMMOAdminChatEvent(McMMOAdminChatEvent event) {
|
||||
String sender = event.getSender();
|
||||
Player player = plugin.getServer().getPlayer(sender);
|
||||
if (plugin.adminPrivateChatHook != null) {
|
||||
if (plugin.adminPrivateChatHook.ac.toggledPlayers.contains(player.getName())) {
|
||||
plugin.logDebug("[onMcMMOAdminChatEvent]: Ignoring chat due to AdminPrivate chat message");
|
||||
return;
|
||||
}
|
||||
}
|
||||
plugin.logDebug("[onMcMMOAdminChatEvent]: " + sender);
|
||||
if (player != null && !sender.isEmpty()) {
|
||||
if (player.hasPermission("irc.message.gamechat")) {
|
||||
@ -72,6 +84,12 @@ public class McMMOChatListener implements Listener {
|
||||
Player player = plugin.getServer().getPlayer(sender);
|
||||
String party = event.getParty();
|
||||
plugin.logDebug("onMcMMOPartyChatEvent caught: " + sender);
|
||||
if (plugin.adminPrivateChatHook != null) {
|
||||
if (plugin.adminPrivateChatHook.ac.toggledPlayers.contains(player.getName())) {
|
||||
plugin.logDebug("[onMcMMOPartyChatEvent]: Ignoring chat due to AdminPrivate chat message");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (player != null && !sender.isEmpty()) {
|
||||
if (player.hasPermission("irc.message.gamechat")) {
|
||||
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
||||
|
Loading…
Reference in New Issue
Block a user