Skip to content

Commit

Permalink
Update protos, add fleet to current server cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakShearman committed Oct 23, 2023
1 parent 64b96bc commit eebcd49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
// APIs
api("dev.emortal.api:module-system:1.0.0")
api("dev.emortal.api:agones-sdk:1.0.7")
api("dev.emortal.api:common-proto-sdk:fa39fcf")
api("dev.emortal.api:common-proto-sdk:dd3214d")
api("dev.emortal.api:live-config-parser:e1f5d21")

api("io.kubernetes:client-java:18.0.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public final class CurrentServerCommand extends Command {

private static final String MESSAGE = """
<dark_purple>Proxy: <light_purple><proxy_id>
<dark_purple>Server: <light_purple><server_id>""";
<dark_purple>Server: <light_purple><server_id>
<dark_purple>Fleet: <light_purple><fleet_id>""";
private static final String COPY_MESSAGE = """
Proxy: %s
Server: %s
Expand Down Expand Up @@ -60,8 +61,9 @@ private void onExecute(@NotNull CommandSender sender, @NotNull CommandContext co

var serverId = Placeholder.unparsed("server_id", currentServer.getServerId());
var proxyId = Placeholder.unparsed("proxy_id", currentServer.getProxyId());
var fleetId = Placeholder.unparsed("fleet_id", currentServer.getFleetName());

var message = MiniMessage.miniMessage().deserialize(MESSAGE, serverId, proxyId)
var message = MiniMessage.miniMessage().deserialize(MESSAGE, serverId, proxyId, fleetId)
.clickEvent(ClickEvent.copyToClipboard(this.createCopyableData(currentServer, player)))
.hoverEvent(HoverEvent.showText(Component.text("Click to copy", NamedTextColor.GREEN)));
sender.sendMessage(message);
Expand Down

0 comments on commit eebcd49

Please sign in to comment.