Skip to content

Commit 7917171

Browse files
committed
[remove] こっちかい
1 parent f664061 commit 7917171

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

balancer/src/main/java/com/jaimemartz/playerbalancer/commands/ManageCommand.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,10 @@ public void execute(CommandSender sender, String[] args) {
3535
String input = args[1];
3636
ServerSection section = plugin.getSectionManager().getByName(input);
3737
if (section != null) {
38-
if (args.length == 3) {
39-
ProxiedPlayer player = plugin.getProxy().getPlayer(args[2]);
40-
if (player != null) {
41-
ConnectionIntent.simple(plugin, player, section);
42-
} else {
43-
sender.sendMessage(new ComponentBuilder("There is no player with that name connected to this proxy").color(ChatColor.RED).create());
44-
}
38+
if (sender instanceof ProxiedPlayer) {
39+
ConnectionIntent.simple(plugin, (ProxiedPlayer) sender, section);
4540
} else {
46-
if (sender instanceof ProxiedPlayer) {
47-
ConnectionIntent.simple(plugin, (ProxiedPlayer) sender, section);
48-
} else {
49-
sender.sendMessage(new ComponentBuilder("This command variant can only be executed by a player").color(ChatColor.RED).create());
50-
}
41+
sender.sendMessage(new ComponentBuilder("This command variant can only be executed by a player").color(ChatColor.RED).create());
5142
}
5243
} else {
5344
MessageUtils.send(sender, plugin.getSettings().getMessagesProps().getUnknownSectionMessage());

0 commit comments

Comments
 (0)