Skip to content

Commit

Permalink
Localization
Browse files Browse the repository at this point in the history
  • Loading branch information
iceBear67 committed Oct 14, 2024
1 parent 5521c40 commit 1e498ef
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 42 deletions.
4 changes: 0 additions & 4 deletions src/main/java/dev/tylerm/khs/configuration/Leaderboard.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ public class Leaderboard {
TAUNT_COUNTING,
TAUNT_ACTIVE,
TAUNT_EXPIRED,
GLOW_ACTIVE,
GLOW_INACTIVE,
BORDER_COUNTING,
BORDER_DECREASING;

Expand All @@ -39,8 +37,6 @@ public static void loadLeaderboard() {
TAUNT_COUNTING = leaderboard.getString("taunt.counting");
TAUNT_ACTIVE = leaderboard.getString("taunt.active");
TAUNT_EXPIRED = leaderboard.getString("taunt.expired");
GLOW_ACTIVE = leaderboard.getString("glow.active");
GLOW_INACTIVE = leaderboard.getString("glow.inactive");
BORDER_COUNTING = leaderboard.getString("border.counting");
BORDER_DECREASING = leaderboard.getString("border.decreasing");

Expand Down
7 changes: 0 additions & 7 deletions src/main/java/dev/tylerm/khs/game/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,6 @@ private void createGameBoard(Player player, boolean recreate) {
} else {
board.setLine(String.valueOf(i), line.replace("{TAUNT}", TAUNT_ACTIVE));
}
} else if (line.contains("{GLOW}")) {
if (!glowEnabled) continue;
if (glow == null || status == Status.STARTING || !glow.isRunning()) {
board.setLine(String.valueOf(i), line.replace("{GLOW}", GLOW_INACTIVE));
} else {
board.setLine(String.valueOf(i), line.replace("{GLOW}", GLOW_ACTIVE));
}
} else if (line.contains("{#SEEKER}")) {
board.setLine(String.valueOf(i), line.replace("{#SEEKER}", getSeekers().size() + ""));
} else if (line.contains("{#HIDER}")) {
Expand Down
14 changes: 7 additions & 7 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,16 +240,16 @@ lobby:
lobbyItems:
leave:
material: "BED"
name: "&cLeave Lobby"
name: "&c离开"
lore: [
"Go back to server hub"
"&f回到大厅"
]
position: 8
model-data: 0
enabled: true
start:
material: "CLOCK"
name: "&bStart Game"
name: "&b开始游戏"
lore: []
position: 0
model-data: 0
Expand All @@ -262,17 +262,17 @@ lobbyItems:
spectatorItems:
flight:
material: "FEATHER"
name: "&bToggle Flight"
name: "&b启用飞行"
lore: [
"Turns flying on and off"
"&f开启/关闭 飞行模式"
]
position: 3
model-data: 0
teleport:
material: "COMPASS"
name: "&bTeleport to Others"
name: "&b传送到玩家"
lore: [
"Allows you to teleport to all other players in game"
"&f使用它传送到其他玩家"
]
position: 5
model-data: 0
Expand Down
43 changes: 19 additions & 24 deletions src/main/resources/leaderboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,48 +45,43 @@
# BE CHANGED, AND THE SECOND ONE WILL SAY A PLACEHOLDER MARKER!

lobby:
title: "&eHIDE AND SEEK"
title: "&e躲猫猫"
content: [
"{COUNTDOWN}",
"",
"Players: {COUNT}",
"玩家数: {COUNT}",
"",
"&cSEEKER % &f{SEEKER%}",
"&6HIDER % &f{HIDER%}",
"&c猎人 % &f{SEEKER%}",
"&6方块 % &f{HIDER%}",
"",
"Map: {MAP}",
"当前地图: {MAP}",
]

game:
title: "&eHIDE AND SEEK"
title: "&e躲猫猫"
content: [
"Map: {MAP}",
"Team: {TEAM}",
"地图: {MAP}",
"队伍: {TEAM}",
"",
"Time Left: &a{TIME}",
"剩余时长: &a{TIME}",
"",
"Taunt: &e{TAUNT}",
"Glow: {GLOW}",
"WorldBorder: &b{BORDER}",
"嘲讽: &e{TAUNT}",
"地图边界: &b{BORDER}",
"",
"&cSEEKERS: &f{#SEEKER}",
"&6HIDERS: &f{#HIDER}"
"&c猎人: &f{#SEEKER}",
"&6方块: &f{#HIDER}"
]

countdown:
waiting: "Waiting for players..."
adminStart: "Waiting for gamemaster..."
counting: "Starting in: &a{AMOUNT}s"
waiting: "等待更多玩家..."
adminStart: "等待管理员..."
counting: "&a{AMOUNT}s&f 后开始"

taunt:
counting: "{AMOUNT}m{AMOUNT}s"
active: "Active"
expired: "Expired"

glow:
active: "&aActive"
inactive: "&cInactive"
active: "激活"
expired: "失效"

border:
counting: "{AMOUNT}m{AMOUNT}s"
decreasing: "Decreasing"
decreasing: "正在缩圈"

0 comments on commit 1e498ef

Please sign in to comment.