Added channel listening check to received DiscordSRV plugin message.

This commit is contained in:
Aust1n46 2021-02-05 18:12:27 -06:00
parent de894c721c
commit ec5e8abf82
3 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,4 @@
name: VentureChat
main: mineverse.Aust1n46.chat.bungee.MineverseChatBungee
version: 2.20.2
version: 2.20.3
author: Aust1n46

View File

@ -778,9 +778,11 @@ public class MineverseChat extends JavaPlugin implements PluginMessageListener {
int hash = (message.replaceAll("([§]([a-z0-9]))", "")).hashCode();
for(MineverseChatPlayer p : MineverseChat.onlinePlayers) {
String finalJSON = Format.formatModerationGUI(json, p.getPlayer(), "Discord", chatChannelObj.getName(), hash);
PacketContainer packet = Format.createPacketPlayOutChat(finalJSON);
Format.sendPacketPlayOutChat(p.getPlayer(), packet);
if(p.isListening(chatChannelObj.getName())) {
String finalJSON = Format.formatModerationGUI(json, p.getPlayer(), "Discord", chatChannelObj.getName(), hash);
PacketContainer packet = Format.createPacketPlayOutChat(finalJSON);
Format.sendPacketPlayOutChat(p.getPlayer(), packet);
}
}
}
if(subchannel.equals("Chwho")) {

View File

@ -1,5 +1,5 @@
name: VentureChat
version: 2.20.2
version: 2.20.3
api-version: 1.13
main: mineverse.Aust1n46.chat.MineverseChat
depend: [Vault, ProtocolLib, PlaceholderAPI]