mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-22 18:09:06 +00:00
Allow ignore bypass for bungeecord messaging (#66)
This commit is contained in:
parent
314fe96e1d
commit
47fbbe23bc
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>mineverse.Aust1n46.chat</groupId>
|
||||
<artifactId>VentureChat</artifactId>
|
||||
<version>3.4.6</version>
|
||||
<version>3.5.0</version>
|
||||
<url>https://bitbucket.org/Aust1n46/venturechat/src/master</url>
|
||||
<scm>
|
||||
<url>https://bitbucket.org/Aust1n46/venturechat/src/master</url>
|
||||
|
@ -605,6 +605,15 @@ public class MineverseChat extends JavaPlugin implements PluginMessageListener {
|
||||
sendPluginMessage(stream);
|
||||
return;
|
||||
}
|
||||
if (p.getPlayer().hasPermission("venturechat.ignore.bypass")) {
|
||||
out.writeUTF("Ignore");
|
||||
out.writeUTF("Bypass");
|
||||
out.writeUTF(server);
|
||||
out.writeUTF(receiver);
|
||||
out.writeUTF(sender.toString());
|
||||
sendPluginMessage(stream);
|
||||
return;
|
||||
}
|
||||
out.writeUTF("Ignore");
|
||||
out.writeUTF("Echo");
|
||||
out.writeUTF(server);
|
||||
@ -640,6 +649,12 @@ public class MineverseChat extends JavaPlugin implements PluginMessageListener {
|
||||
.replace("{player}", receiverName));
|
||||
synchronize(p, true);
|
||||
}
|
||||
if(identifier.equals("Bypass")) {
|
||||
String receiver = msgin.readUTF();
|
||||
UUID sender = UUID.fromString(msgin.readUTF());
|
||||
MineverseChatPlayer p = MineverseChatAPI.getOnlineMineverseChatPlayer(sender);
|
||||
p.getPlayer().sendMessage(LocalizedMessage.IGNORE_PLAYER_CANT.toString().replace("{player}", receiver));
|
||||
}
|
||||
}
|
||||
if(subchannel.equals("Mute")) {
|
||||
String identifier = msgin.readUTF();
|
||||
|
@ -205,6 +205,18 @@ public class VentureChatProxy {
|
||||
source.sendPluginMessage(server, outstream.toByteArray());
|
||||
}
|
||||
}
|
||||
if(identifier.equals("Bypass")) {
|
||||
String server = in.readUTF();
|
||||
String player = in.readUTF();
|
||||
String sender = in.readUTF();
|
||||
out.writeUTF("Ignore");
|
||||
out.writeUTF("Bypass");
|
||||
out.writeUTF(player);
|
||||
out.writeUTF(sender);
|
||||
if(!source.getServer(server).isEmpty()) {
|
||||
source.sendPluginMessage(server, outstream.toByteArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
if(subchannel.equals("Mute")) {
|
||||
String identifier = in.readUTF();
|
||||
|
Loading…
x
Reference in New Issue
Block a user