Skip to content

Commit

Permalink
Merge pull request #38 from Antideveloppeur/fix/commands
Browse files Browse the repository at this point in the history
Fix execution of the velocity send command from the console
  • Loading branch information
jacoballen1 authored Aug 14, 2020
2 parents 3347c18 + bc96a0b commit dabde08
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public void execute(CommandSource source, @NonNull String[] args) {
TextComponent.of(player.get().getUsername()
+ " is already connected to that server.")));
} else {
Player sender = (Player) source;
source.sendMessage(
pluginInfo.getPrefix().append(
TextComponent.of("sending " + player.get().getUsername()
Expand All @@ -84,7 +83,7 @@ public void execute(CommandSource source, @NonNull String[] args) {
pluginInfo.getPrefix().append(
TextComponent.of("you have been sent to "
+ server.get().getServerInfo().getName()
+ " by " + sender.getUsername())));
+ " by " + (source instanceof Player ? ((Player) source).getUsername() : "Console"))));
player.get().createConnectionRequest(server.get()).fireAndForget();
}
} else {
Expand Down

0 comments on commit dabde08

Please sign in to comment.