mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2025-02-18 04:21:23 +01:00
Prevent duplicate AdminChat messages when FactionChat is detected.
This commit is contained in:
parent
aa08c80d7a
commit
09f88c37b9
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.cnaude.purpleirc.GameListeners;
|
||||
|
||||
import com.ammaraskar.adminonly.AdminChat;
|
||||
import com.cnaude.purpleirc.PurpleBot;
|
||||
import com.cnaude.purpleirc.PurpleIRC;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -60,6 +61,10 @@ 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 (event.getPlayer().hasPermission("irc.message.gamechat")) {
|
||||
plugin.logDebug("Player " + event.getPlayer().getName() + " has permission irc.message.gamechat");
|
||||
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
||||
|
@ -26,7 +26,7 @@ import com.cnaude.purpleirc.PurpleIRC;
|
||||
public class AdminPrivateChatHook {
|
||||
|
||||
private final PurpleIRC plugin;
|
||||
private final AdminChat ac;
|
||||
public final AdminChat ac;
|
||||
|
||||
/**
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user