2
0
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:
Tux
2014-01-16 21:31:57 -05:00
parent b470b7a3df
commit d6afec5f47
3 changed files with 23 additions and 0 deletions

View File

@@ -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);
}
}
}