mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 02:19:05 +00:00
Delete outdated BungeeCord muting commands.
This commit is contained in:
parent
704905d439
commit
4f1cd8b494
@ -1,4 +0,0 @@
|
|||||||
/GlobalMute.class
|
|
||||||
/GlobalMuteAll.class
|
|
||||||
/GlobalUnmute.class
|
|
||||||
/GlobalUnmuteAll.class
|
|
@ -1,70 +0,0 @@
|
|||||||
package mineverse.Aust1n46.chat.bungee.command;
|
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.DataOutputStream;
|
|
||||||
|
|
||||||
import mineverse.Aust1n46.chat.bungee.MineverseChatBungee;
|
|
||||||
|
|
||||||
import net.md_5.bungee.api.ChatColor;
|
|
||||||
import net.md_5.bungee.api.CommandSender;
|
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
|
||||||
import net.md_5.bungee.api.plugin.Command;
|
|
||||||
|
|
||||||
public class GlobalMute extends Command {
|
|
||||||
private MineverseChatBungee plugin;
|
|
||||||
private String alias;
|
|
||||||
|
|
||||||
public GlobalMute(MineverseChatBungee plugin, String alias) {
|
|
||||||
super(alias);
|
|
||||||
this.plugin = plugin;
|
|
||||||
this.alias = alias;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute(CommandSender commandSender, String[] args) {
|
|
||||||
if(!(commandSender instanceof ProxiedPlayer)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(commandSender.hasPermission("venturechat.mute")) {
|
|
||||||
if(args.length < 3) {
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid command: /" + alias + " [server] [player] [channel] {time}"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ProxiedPlayer player = plugin.getProxy().getPlayer(args[1]);
|
|
||||||
if(player != null) {
|
|
||||||
if(plugin.getProxy().getServers().containsKey(args[0])) {
|
|
||||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
|
||||||
DataOutputStream out = new DataOutputStream(stream);
|
|
||||||
try {
|
|
||||||
out.writeUTF("Mute");
|
|
||||||
out.writeUTF(commandSender.getName());
|
|
||||||
out.writeUTF(args[1]);
|
|
||||||
out.writeUTF(args[2]);
|
|
||||||
out.writeUTF(args[0]);
|
|
||||||
String time = "None\n";
|
|
||||||
if(args.length > 3) {
|
|
||||||
time = args[3];
|
|
||||||
}
|
|
||||||
out.writeUTF(time);
|
|
||||||
if(plugin.getProxy().getServers().get(args[0]).getPlayers().size() > 0) {
|
|
||||||
plugin.getProxy().getServers().get(args[0]).sendData(MineverseChatBungee.PLUGIN_MESSAGING_CHANNEL, stream.toByteArray());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not connected to server: " + args[0]));
|
|
||||||
}
|
|
||||||
catch(Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid server: " + args[0]));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not online."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "You do not have permission for this command."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,62 +0,0 @@
|
|||||||
package mineverse.Aust1n46.chat.bungee.command;
|
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.DataOutputStream;
|
|
||||||
import mineverse.Aust1n46.chat.bungee.MineverseChatBungee;
|
|
||||||
import net.md_5.bungee.api.ChatColor;
|
|
||||||
import net.md_5.bungee.api.CommandSender;
|
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
|
||||||
import net.md_5.bungee.api.plugin.Command;
|
|
||||||
|
|
||||||
public class GlobalMuteAll extends Command {
|
|
||||||
private MineverseChatBungee plugin;
|
|
||||||
private String alias;
|
|
||||||
|
|
||||||
public GlobalMuteAll(MineverseChatBungee plugin, String alias) {
|
|
||||||
super(alias);
|
|
||||||
this.plugin = plugin;
|
|
||||||
this.alias = alias;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute(CommandSender commandSender, String[] args) {
|
|
||||||
if(!(commandSender instanceof ProxiedPlayer)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(commandSender.hasPermission("venturechat.mute")) {
|
|
||||||
if(args.length < 2) {
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid command: /" + alias + " [server] [player]"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ProxiedPlayer player = plugin.getProxy().getPlayer(args[1]);
|
|
||||||
if(player != null) {
|
|
||||||
if(plugin.getProxy().getServers().containsKey(args[0])) {
|
|
||||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
|
||||||
DataOutputStream out = new DataOutputStream(stream);
|
|
||||||
try {
|
|
||||||
out.writeUTF("Muteall");
|
|
||||||
out.writeUTF(commandSender.getName());
|
|
||||||
out.writeUTF(args[1]);
|
|
||||||
out.writeUTF(args[0]);
|
|
||||||
if(plugin.getProxy().getServers().get(args[0]).getPlayers().size() > 0) {
|
|
||||||
plugin.getProxy().getServers().get(args[0]).sendData(MineverseChatBungee.PLUGIN_MESSAGING_CHANNEL, stream.toByteArray());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not connected to server: " + args[0]));
|
|
||||||
}
|
|
||||||
catch(Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid server: " + args[0]));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not online."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "You do not have permission for this command."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,64 +0,0 @@
|
|||||||
package mineverse.Aust1n46.chat.bungee.command;
|
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.DataOutputStream;
|
|
||||||
|
|
||||||
import mineverse.Aust1n46.chat.bungee.MineverseChatBungee;
|
|
||||||
import net.md_5.bungee.api.ChatColor;
|
|
||||||
import net.md_5.bungee.api.CommandSender;
|
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
|
||||||
import net.md_5.bungee.api.plugin.Command;
|
|
||||||
|
|
||||||
public class GlobalUnmute extends Command {
|
|
||||||
private MineverseChatBungee plugin;
|
|
||||||
private String alias;
|
|
||||||
|
|
||||||
public GlobalUnmute(MineverseChatBungee plugin, String alias) {
|
|
||||||
super(alias);
|
|
||||||
this.plugin = plugin;
|
|
||||||
this.alias = alias;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute(CommandSender commandSender, String[] args) {
|
|
||||||
if(!(commandSender instanceof ProxiedPlayer)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(commandSender.hasPermission("venturechat.mute")) {
|
|
||||||
if(args.length < 3) {
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid command: /" + alias + " [server] [player] [channel]"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ProxiedPlayer player = plugin.getProxy().getPlayer(args[1]);
|
|
||||||
if(player != null) {
|
|
||||||
if(plugin.getProxy().getServers().containsKey(args[0])) {
|
|
||||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
|
||||||
DataOutputStream out = new DataOutputStream(stream);
|
|
||||||
try {
|
|
||||||
out.writeUTF("Unmute");
|
|
||||||
out.writeUTF(commandSender.getName());
|
|
||||||
out.writeUTF(args[1]);
|
|
||||||
out.writeUTF(args[2]);
|
|
||||||
out.writeUTF(args[0]);
|
|
||||||
if(plugin.getProxy().getServers().get(args[0]).getPlayers().size() > 0) {
|
|
||||||
plugin.getProxy().getServers().get(args[0]).sendData(MineverseChatBungee.PLUGIN_MESSAGING_CHANNEL, stream.toByteArray());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not connected to server: " + args[0]));
|
|
||||||
}
|
|
||||||
catch(Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid server: " + args[0]));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not online."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "You do not have permission for this command."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,62 +0,0 @@
|
|||||||
package mineverse.Aust1n46.chat.bungee.command;
|
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.DataOutputStream;
|
|
||||||
import mineverse.Aust1n46.chat.bungee.MineverseChatBungee;
|
|
||||||
import net.md_5.bungee.api.ChatColor;
|
|
||||||
import net.md_5.bungee.api.CommandSender;
|
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
|
||||||
import net.md_5.bungee.api.plugin.Command;
|
|
||||||
|
|
||||||
public class GlobalUnmuteAll extends Command {
|
|
||||||
private MineverseChatBungee plugin;
|
|
||||||
private String alias;
|
|
||||||
|
|
||||||
public GlobalUnmuteAll(MineverseChatBungee plugin, String alias) {
|
|
||||||
super(alias);
|
|
||||||
this.plugin = plugin;
|
|
||||||
this.alias = alias;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute(CommandSender commandSender, String[] args) {
|
|
||||||
if(!(commandSender instanceof ProxiedPlayer)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(commandSender.hasPermission("venturechat.mute")) {
|
|
||||||
if(args.length < 2) {
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid command: /" + alias + " [server] [player]"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ProxiedPlayer player = plugin.getProxy().getPlayer(args[1]);
|
|
||||||
if(player != null) {
|
|
||||||
if(plugin.getProxy().getServers().containsKey(args[0])) {
|
|
||||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
|
||||||
DataOutputStream out = new DataOutputStream(stream);
|
|
||||||
try {
|
|
||||||
out.writeUTF("Unmuteall");
|
|
||||||
out.writeUTF(commandSender.getName());
|
|
||||||
out.writeUTF(args[1]);
|
|
||||||
out.writeUTF(args[0]);
|
|
||||||
if(plugin.getProxy().getServers().get(args[0]).getPlayers().size() > 0) {
|
|
||||||
plugin.getProxy().getServers().get(args[0]).sendData(MineverseChatBungee.PLUGIN_MESSAGING_CHANNEL, stream.toByteArray());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not connected to server: " + args[0]));
|
|
||||||
}
|
|
||||||
catch(Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Invalid server: " + args[0]));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "Player: " + ChatColor.GOLD + args[1] + ChatColor.RED + " is not online."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandSender.sendMessage(new TextComponent(ChatColor.RED + "You do not have permission for this command."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user