mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 10:39:05 +00:00
Updated global muting to the new plugin messaging channel
Updated config entry for remove message command format
This commit is contained in:
parent
0b87ebf8c4
commit
de4ee833b4
@ -194,7 +194,7 @@ venturegui:
|
|||||||
durability: 0
|
durability: 0
|
||||||
text: '&cRemove Message'
|
text: '&cRemove Message'
|
||||||
permission: 'removemessage'
|
permission: 'removemessage'
|
||||||
command: '/removemessage {hash} {channel} true'
|
command: '/removemessage {hash} {channel}'
|
||||||
slot: 7
|
slot: 7
|
||||||
|
|
||||||
guiicon: '&c [✓]'
|
guiicon: '&c [✓]'
|
||||||
|
@ -194,7 +194,7 @@ venturegui:
|
|||||||
durability: 0
|
durability: 0
|
||||||
text: '&cRemove Message'
|
text: '&cRemove Message'
|
||||||
permission: 'removemessage'
|
permission: 'removemessage'
|
||||||
command: '/removemessage {hash} {channel} true'
|
command: '/removemessage {hash} {channel}'
|
||||||
slot: 7
|
slot: 7
|
||||||
|
|
||||||
guiicon: '&c [✓]'
|
guiicon: '&c [✓]'
|
||||||
|
@ -557,7 +557,6 @@ public class MineverseChat extends JavaPlugin implements PluginMessageListener {
|
|||||||
StringBuilder stringbuilder = new StringBuilder();
|
StringBuilder stringbuilder = new StringBuilder();
|
||||||
try {
|
try {
|
||||||
splitComponents(finalList, o, c);
|
splitComponents(finalList, o, c);
|
||||||
|
|
||||||
for(Object component : finalList) {
|
for(Object component : finalList) {
|
||||||
if(VersionHandler.is1_7_10()) {
|
if(VersionHandler.is1_7_10()) {
|
||||||
stringbuilder.append((String) component.getClass().getMethod("e").invoke(component));
|
stringbuilder.append((String) component.getClass().getMethod("e").invoke(component));
|
||||||
|
@ -26,7 +26,7 @@ public class GlobalMute extends Command {
|
|||||||
if(!(commandSender instanceof ProxiedPlayer)) {
|
if(!(commandSender instanceof ProxiedPlayer)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(commandSender.hasPermission("mineversechat.mute")) {
|
if(commandSender.hasPermission("venturechat.mute")) {
|
||||||
if(args.length < 3) {
|
if(args.length < 3) {
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid command: /" + alias + " [server] [player] [channel] {time}"));
|
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid command: /" + alias + " [server] [player] [channel] {time}"));
|
||||||
return;
|
return;
|
||||||
@ -48,7 +48,7 @@ public class GlobalMute extends Command {
|
|||||||
}
|
}
|
||||||
out.writeUTF(time);
|
out.writeUTF(time);
|
||||||
if(plugin.getProxy().getServers().get(args[0]).getPlayers().size() > 0) {
|
if(plugin.getProxy().getServers().get(args[0]).getPlayers().size() > 0) {
|
||||||
plugin.getProxy().getServers().get(args[0]).sendData("MineverseChat", stream.toByteArray());
|
plugin.getProxy().getServers().get(args[0]).sendData("venturechat:", stream.toByteArray());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not connected to server: " + args[0]));
|
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not connected to server: " + args[0]));
|
||||||
|
@ -24,7 +24,7 @@ public class GlobalMuteAll extends Command {
|
|||||||
if(!(commandSender instanceof ProxiedPlayer)) {
|
if(!(commandSender instanceof ProxiedPlayer)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(commandSender.hasPermission("mineversechat.mute")) {
|
if(commandSender.hasPermission("venturechat.mute")) {
|
||||||
if(args.length < 2) {
|
if(args.length < 2) {
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid command: /" + alias + " [server] [player]"));
|
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid command: /" + alias + " [server] [player]"));
|
||||||
return;
|
return;
|
||||||
@ -40,7 +40,7 @@ public class GlobalMuteAll extends Command {
|
|||||||
out.writeUTF(args[1]);
|
out.writeUTF(args[1]);
|
||||||
out.writeUTF(args[0]);
|
out.writeUTF(args[0]);
|
||||||
if(plugin.getProxy().getServers().get(args[0]).getPlayers().size() > 0) {
|
if(plugin.getProxy().getServers().get(args[0]).getPlayers().size() > 0) {
|
||||||
plugin.getProxy().getServers().get(args[0]).sendData("MineverseChat", stream.toByteArray());
|
plugin.getProxy().getServers().get(args[0]).sendData("venturechat:", stream.toByteArray());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not connected to server: " + args[0]));
|
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not connected to server: " + args[0]));
|
||||||
|
@ -25,7 +25,7 @@ public class GlobalUnmute extends Command {
|
|||||||
if(!(commandSender instanceof ProxiedPlayer)) {
|
if(!(commandSender instanceof ProxiedPlayer)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(commandSender.hasPermission("mineversechat.mute")) {
|
if(commandSender.hasPermission("venturechat.mute")) {
|
||||||
if(args.length < 3) {
|
if(args.length < 3) {
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid command: /" + alias + " [server] [player] [channel]"));
|
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid command: /" + alias + " [server] [player] [channel]"));
|
||||||
return;
|
return;
|
||||||
@ -42,7 +42,7 @@ public class GlobalUnmute extends Command {
|
|||||||
out.writeUTF(args[2]);
|
out.writeUTF(args[2]);
|
||||||
out.writeUTF(args[0]);
|
out.writeUTF(args[0]);
|
||||||
if(plugin.getProxy().getServers().get(args[0]).getPlayers().size() > 0) {
|
if(plugin.getProxy().getServers().get(args[0]).getPlayers().size() > 0) {
|
||||||
plugin.getProxy().getServers().get(args[0]).sendData("MineverseChat", stream.toByteArray());
|
plugin.getProxy().getServers().get(args[0]).sendData("venturechat:", stream.toByteArray());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not connected to server: " + args[0]));
|
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not connected to server: " + args[0]));
|
||||||
|
@ -24,7 +24,7 @@ public class GlobalUnmuteAll extends Command {
|
|||||||
if(!(commandSender instanceof ProxiedPlayer)) {
|
if(!(commandSender instanceof ProxiedPlayer)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(commandSender.hasPermission("mineversechat.mute")) {
|
if(commandSender.hasPermission("venturechat.mute")) {
|
||||||
if(args.length < 2) {
|
if(args.length < 2) {
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid command: /" + alias + " [server] [player]"));
|
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid command: /" + alias + " [server] [player]"));
|
||||||
return;
|
return;
|
||||||
@ -40,7 +40,7 @@ public class GlobalUnmuteAll extends Command {
|
|||||||
out.writeUTF(args[1]);
|
out.writeUTF(args[1]);
|
||||||
out.writeUTF(args[0]);
|
out.writeUTF(args[0]);
|
||||||
if(plugin.getProxy().getServers().get(args[0]).getPlayers().size() > 0) {
|
if(plugin.getProxy().getServers().get(args[0]).getPlayers().size() > 0) {
|
||||||
plugin.getProxy().getServers().get(args[0]).sendData("MineverseChat", stream.toByteArray());
|
plugin.getProxy().getServers().get(args[0]).sendData("venturechat:", stream.toByteArray());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not connected to server: " + args[0]));
|
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not connected to server: " + args[0]));
|
||||||
|
@ -50,7 +50,7 @@ public class Removemessage extends MineverseCommand {
|
|||||||
sender.sendMessage(ChatColor.RED + "Invalid hashcode.");
|
sender.sendMessage(ChatColor.RED + "Invalid hashcode.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(args.length > 1 && MineverseChat.ccInfo.isChannel(args[1]) && MineverseChat.ccInfo.getChannelInfo(args[1]).getBungee() && Boolean.parseBoolean(args[2]) && sender instanceof Player) {
|
if(args.length > 1 && MineverseChat.ccInfo.isChannel(args[1]) && MineverseChat.ccInfo.getChannelInfo(args[1]).getBungee() && sender instanceof Player) {
|
||||||
ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream();
|
ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream();
|
||||||
DataOutputStream out = new DataOutputStream(byteOutStream);
|
DataOutputStream out = new DataOutputStream(byteOutStream);
|
||||||
try {
|
try {
|
||||||
@ -64,6 +64,7 @@ public class Removemessage extends MineverseCommand {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
final Map<Player, List<PacketContainer>> packets = new HashMap();
|
final Map<Player, List<PacketContainer>> packets = new HashMap();
|
||||||
@ -161,6 +162,7 @@ public class Removemessage extends MineverseCommand {
|
|||||||
}
|
}
|
||||||
}.runTaskAsynchronously(plugin);
|
}.runTaskAsynchronously(plugin);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private PacketContainer createPacketPlayOutChat(WrappedChatComponent component) {
|
private PacketContainer createPacketPlayOutChat(WrappedChatComponent component) {
|
||||||
PacketContainer container = new PacketContainer(PacketType.Play.Server.CHAT);
|
PacketContainer container = new PacketContainer(PacketType.Play.Server.CHAT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user