Skip to content

Commit

Permalink
Fix compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed Jul 28, 2022
1 parent e217b4d commit d7d05bc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ public void onActivityJoin(@NotNull String secret) {
}
lobbyManager.connectNetwork(lobby);
lobbyManager.openNetworkChannel(lobby, NETWORK_SYSTEM_MESSAGE_ID, true);
var me = core.userManager().getCurrentUser();
var tag = me.getUsername() + "#" + me.getDiscriminator();
// TODO: translate
byte[] data = Component.Serializer.toJson(new TextComponent(tag + " joined the lobby!").withStyle(ChatFormatting.YELLOW)).getBytes(StandardCharsets.UTF_8);
byte[] data = Component.Serializer.toJson(Component.literal(tag + " joined the lobby!").withStyle(ChatFormatting.YELLOW)).getBytes(StandardCharsets.UTF_8);
for (DiscordUser user : lobbyManager.getMemberUsers(lobby)) {
lobbyManager.sendNetworkMessage(lobby, user.getUserId(), NETWORK_SYSTEM_MESSAGE_ID, data);
}
Expand Down

0 comments on commit d7d05bc

Please sign in to comment.