mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 10:39:05 +00:00
Added API method isListening(channel) to MineverseChatPlayer class
This commit is contained in:
parent
116f1b69d4
commit
5142e1bb0a
@ -688,7 +688,7 @@ public class MineverseChat extends JavaPlugin implements PluginMessageListener {
|
||||
if(ccInfo.isChannel(chatchannel) && ccInfo.getChannelInfo(chatchannel).getBungee()) {
|
||||
Bukkit.getConsoleSender().sendMessage(consoleChat);
|
||||
for(MineverseChatPlayer p : MineverseChat.onlinePlayers) {
|
||||
if(p.getListening().contains(ccInfo.getChannelInfo(chatchannel).getName())) {
|
||||
if(p.isListening(ccInfo.getChannelInfo(chatchannel).getName())) {
|
||||
if(!p.getBungeeToggle() && MineverseChatAPI.getOnlineMineverseChatPlayer(senderName) == null) {
|
||||
continue;
|
||||
}
|
||||
@ -718,7 +718,7 @@ public class MineverseChat extends JavaPlugin implements PluginMessageListener {
|
||||
List<String> listening = new ArrayList<String>();
|
||||
if(ccInfo.isChannel(chatchannel)) {
|
||||
for(MineverseChatPlayer mcp : onlinePlayers) {
|
||||
if(mcp.getListening().contains(chatchannel)) {
|
||||
if(mcp.isListening(chatchannel)) {
|
||||
String entry = "&f" + mcp.getName();
|
||||
if(mcp.isMuted(chatchannel)) {
|
||||
entry = "&c" + mcp.getName();
|
||||
|
@ -199,6 +199,10 @@ public class MineverseChatPlayer {
|
||||
return this.listening;
|
||||
}
|
||||
|
||||
public boolean isListening(String channel) {
|
||||
return this.listening.contains(channel);
|
||||
}
|
||||
|
||||
public boolean addListening(String channel) {
|
||||
if(channel != null) {
|
||||
this.listening.add(channel);
|
||||
|
@ -346,7 +346,7 @@ public class ChatListener implements Listener {
|
||||
PluginManager pluginManager = plugin.getServer().getPluginManager();
|
||||
for(MineverseChatPlayer p : MineverseChat.onlinePlayers) {
|
||||
if(p.getPlayer() != mcp.getPlayer()) {
|
||||
if(!p.getListening().contains(eventChannel.getName())) {
|
||||
if(!p.isListening(eventChannel.getName())) {
|
||||
recipients.remove(p.getPlayer());
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user