Skip to content

Commit

Permalink
feature: add language key for placeholder %fuji:pos%
Browse files Browse the repository at this point in the history
  • Loading branch information
sakurawald committed Jul 16, 2024
1 parent 60e08c4 commit d460a8e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ public void registerPosPlaceholder() {
break;
}

Component component = Component.text("[%d %d %d, %s]".formatted(x, y, z, dim_display_name))
.decoration(TextDecoration.ITALIC, true)
Component component = MessageUtil.ofComponent(player, true, "placeholder.pos", x, y, z, dim_display_name)
.clickEvent(ClickEvent.runCommand(clickCommand))
.hoverEvent(Component.text(hoverString + "\n").append(MessageUtil.ofComponent(player, "chat.xaero_waypoint_add")));

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/fuji/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"top_chunks.prop.types.entry": "[type]=%d ",
"top_chunks.prop.hidden": "hidden",
"top_chunks.prop.hidden.bypass": "%s (bypass-hidden)",
"placeholder.pos": "<#2596be>[%d %d %d, %s]",
"display.gui.title": "Player %s 's Display",
"display.invalid": "This display is invalid",
"display.inventory.text": "<#D2E0FB>[Inventory Display]",
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/fuji/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,6 @@
"chat.xaero_waypoint_add.command": "/xaero_waypoint_add:路径点:·:%d:%s:%d:0:false:0:Internal_%s_waypoints",
"anti_build.disallow": "<red>该操作被禁止",
"nickname.set": "<gold>名称已修改",
"nickname.unset": "<gold>名称已还原"
"nickname.unset": "<gold>名称已还原",
"placeholder.pos": "<#2596be>[%d %d %d, %s]"
}

0 comments on commit d460a8e

Please sign in to comment.