mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 10:39:05 +00:00
Fixed BungeeCord ignoring when player to ignore has never logged into
server the command executer is playing on.
This commit is contained in:
parent
1ef0b818c2
commit
d77da1c3e4
@ -784,7 +784,6 @@ public class MineverseChat extends JavaPlugin implements PluginMessageListener {
|
|||||||
if(ccInfo.isChannel(chatchannel) && ccInfo.getChannelInfo(chatchannel).getBungee()) {
|
if(ccInfo.isChannel(chatchannel) && ccInfo.getChannelInfo(chatchannel).getBungee()) {
|
||||||
Bukkit.getConsoleSender().sendMessage(consoleChat);
|
Bukkit.getConsoleSender().sendMessage(consoleChat);
|
||||||
for(MineverseChatPlayer p : MineverseChat.onlinePlayers) {
|
for(MineverseChatPlayer p : MineverseChat.onlinePlayers) {
|
||||||
System.out.println(p.getName() + " received chat message");
|
|
||||||
if(p.getListening().contains(ccInfo.getChannelInfo(chatchannel).getName())) {
|
if(p.getListening().contains(ccInfo.getChannelInfo(chatchannel).getName())) {
|
||||||
if(!p.getBungeeToggle() && MineverseChatAPI.getOnlineMineverseChatPlayer(senderName) == null) {
|
if(!p.getBungeeToggle() && MineverseChatAPI.getOnlineMineverseChatPlayer(senderName) == null) {
|
||||||
continue;
|
continue;
|
||||||
@ -974,6 +973,14 @@ public class MineverseChat extends JavaPlugin implements PluginMessageListener {
|
|||||||
if(r != null) {
|
if(r != null) {
|
||||||
rName = Format.FormatStringAll(r.getNickname());
|
rName = Format.FormatStringAll(r.getNickname());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(p.getIgnores().contains(receiver)) {
|
||||||
|
p.getPlayer().sendMessage(ChatColor.GOLD + "You are no longer ignoring player: " + ChatColor.RED + rName);
|
||||||
|
p.removeIgnore(receiver);
|
||||||
|
plugin.synchronize(p, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
p.addIgnore(receiver);
|
p.addIgnore(receiver);
|
||||||
p.getPlayer().sendMessage(ChatColor.GOLD + "You are now ignoring player: " + ChatColor.RED + rName);
|
p.getPlayer().sendMessage(ChatColor.GOLD + "You are now ignoring player: " + ChatColor.RED + rName);
|
||||||
this.synchronize(p, true);
|
this.synchronize(p, true);
|
||||||
|
@ -47,20 +47,6 @@ public class Ignore extends MineverseCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MineverseChatPlayer player = MineverseChatAPI.getMineverseChatPlayer(args[0]);
|
MineverseChatPlayer player = MineverseChatAPI.getMineverseChatPlayer(args[0]);
|
||||||
if(player == null) {
|
|
||||||
mcp.getPlayer().sendMessage(ChatColor.RED + "Player: " + ChatColor.GOLD + args[0] + ChatColor.RED + " is not online.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(mcp.getIgnores().contains(player.getUUID())) {
|
|
||||||
mcp.getPlayer().sendMessage(ChatColor.GOLD + "You are no longer ignoring player: " + ChatColor.RED + player.getName());
|
|
||||||
mcp.removeIgnore(player.getUUID());
|
|
||||||
plugin.synchronize(mcp, true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(mcp.getName().equalsIgnoreCase(player.getName())) {
|
|
||||||
mcp.getPlayer().sendMessage(ChatColor.RED + "You can not ignore yourself!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(plugin.getConfig().getBoolean("bungeecordmessaging", true)) {
|
if(plugin.getConfig().getBoolean("bungeecordmessaging", true)) {
|
||||||
ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream();
|
ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream();
|
||||||
DataOutputStream out = new DataOutputStream(byteOutStream);
|
DataOutputStream out = new DataOutputStream(byteOutStream);
|
||||||
@ -76,6 +62,20 @@ public class Ignore extends MineverseCommand {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
if(player == null) {
|
||||||
|
mcp.getPlayer().sendMessage(ChatColor.RED + "Player: " + ChatColor.GOLD + args[0] + ChatColor.RED + " is not online.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(mcp.getIgnores().contains(player.getUUID())) {
|
||||||
|
mcp.getPlayer().sendMessage(ChatColor.GOLD + "You are no longer ignoring player: " + ChatColor.RED + player.getName());
|
||||||
|
mcp.removeIgnore(player.getUUID());
|
||||||
|
plugin.synchronize(mcp, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(mcp.getName().equalsIgnoreCase(player.getName())) {
|
||||||
|
mcp.getPlayer().sendMessage(ChatColor.RED + "You can not ignore yourself!");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if(!player.isOnline()) {
|
if(!player.isOnline()) {
|
||||||
mcp.getPlayer().sendMessage(ChatColor.RED + "Player: " + ChatColor.GOLD + player.getName() + ChatColor.RED + " is not online.");
|
mcp.getPlayer().sendMessage(ChatColor.RED + "Player: " + ChatColor.GOLD + player.getName() + ChatColor.RED + " is not online.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user