1
0
Fork 0
forked from mc/VTools

add vtools.send.recvmsg permission

This commit is contained in:
JerryXiao 2023-03-20 18:44:02 +08:00
parent bad2c2d0c1
commit ee63121964
Signed by untrusted user: Jerry
GPG key ID: 22618F758B5BE2E5
2 changed files with 4 additions and 5 deletions

View file

@ -6,7 +6,7 @@ Tools for Velocity proxy server.
|-------|-------------|----------|
|/broadcast|Broadcast a message to all servers|vtools.broadcast|
|/find|See on which server a user is|vtools.find and vtools.find.autocomplete|
|/send|Send user or users to a different server|vtools.send|
|/send|Send user or users to a different server|vtools.send and vtools.send.recvmsg|
|/staffchat|Chat over multiple servers in a staff only chat|vtools.staffchat|
|/staffchat c:channelname|Chat over multiple servers in a staff only chat in a specific extra permissions channel|vtools.staffchat.channelname|
|/servers|List all servers|vtools.servers|

View file

@ -48,9 +48,6 @@ public class CommandSend implements SimpleCommand {
commandSource.sendMessage(Component.text("Command is only for players.").color(COLOR_RED));
return;
}
for (Player player : server.getAllPlayers()) {
oPlayer.add(player);
}
}
else {
Optional<Player> p = server.getPlayer(strings[0]);
@ -66,7 +63,9 @@ public class CommandSend implements SimpleCommand {
if (oPlayer.size() <= 1) {
commandSource.sendMessage(Component.text("You send " + player.getUsername() + " to " + server.getServerInfo().getName()).color(COLOR_YELLOW));
}
//commandSource.sendMessage(Component.text("You got send to " + server.getServerInfo().getName()).color(COLOR_YELLOW));
if (player.hasPermission("vtools.send.recvmsg")) {
commandSource.sendMessage(Component.text("You got send to " + server.getServerInfo().getName()).color(COLOR_YELLOW));
}
}
if (oPlayer.size() > 1) {
commandSource.sendMessage(Component.text(String.format("You send %d players to %s", oPlayer.size(), server.getServerInfo().getName())).color(COLOR_YELLOW));