mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2026-05-03 11:40:29 +00:00
Add server-id fetch and /serverid command
This commit is contained in:
@@ -165,4 +165,18 @@ class RedisBungeeCommands {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class ServerId extends Command {
|
||||
ServerId() {
|
||||
super("serverid", "redisbungee.command.serverid");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
TextComponent textComponent = new TextComponent();
|
||||
textComponent.setText("You are on " + RedisBungee.getApi().getServerId() + ".");
|
||||
textComponent.setColor(ChatColor.YELLOW);
|
||||
sender.sendMessage(textComponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user