Skip to content

Commit

Permalink
fix: chat module gets the wrong dimension value
Browse files Browse the repository at this point in the history
  • Loading branch information
sakurawald committed Jun 5, 2024
1 parent 26fb79b commit 0e1c9db
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ private Component resolvePositionTag(ServerPlayerEntity player, Component compon
.replaceAll("-waypoints$", "_waypoints");
} else {
hoverText = MessageUtil.ofString(player, "chat.current_pos");
dim_name = player.getWorld().getRegistryKey().getRegistry().toString().replaceFirst("minecraft:", "");

dim_name = player.getWorld().getRegistryKey().getValue().toString().replaceFirst("minecraft:", "");
x = player.getBlockX();
y = Integer.toString(player.getBlockY());
z = player.getBlockZ();
Expand Down Expand Up @@ -278,7 +279,6 @@ public void broadcastChatMessage(ServerPlayerEntity player, String message) {
message = chatHandler.model().format.player2format.getOrDefault(player.getGameProfile().getName(), message)
.replace("%message%", message);
message = resolveMentionTag(message);

String format = Configs.configHandler.model().modules.chat.format;
format = format.replace("%message%", message);
format = format.replace("%player%", player.getGameProfile().getName());
Expand Down

0 comments on commit 0e1c9db

Please sign in to comment.