aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLéo Kosman <leo.kosman@proton.me>2024-08-31 14:03:41 +0200
committerLéo Kosman <leo.kosman@proton.me>2024-08-31 14:03:41 +0200
commit6f65825e1504a1090405685404e7cbc59bd0f44b (patch)
tree73ab400eef0a6b451c045f997e6447608a87b37c
parent07ec479ef0ed9d9cebf4af9c1e1e831d579a8bb6 (diff)
style: rename translation key
-rw-r--r--Writerside/topics/resource-pack.md2
-rw-r--r--src/client/resources/assets/molehunt/lang/en_us.json2
-rw-r--r--src/client/resources/assets/molehunt/lang/fr_fr.json2
-rw-r--r--src/main/java/world/anhgelus/molehunt/Molehunt.java6
4 files changed, 6 insertions, 6 deletions
diff --git a/Writerside/topics/resource-pack.md b/Writerside/topics/resource-pack.md
index d97450e..b3bbf86 100644
--- a/Writerside/topics/resource-pack.md
+++ b/Writerside/topics/resource-pack.md
@@ -139,7 +139,7 @@ customize the mod's text lines.
```json
{
- "commands.molehunt.stop.failed": "The Molehunt game has not been started yet.",
+ "commands.molehunt.error.game_not_started": "The Molehunt game has not been started yet.",
"commands.molehunt.timer.show": "Showing Molehunt timer.",
"commands.molehunt.timer.hide": "Hiding Molehunt timer.",
"commands.molehunt.role.mole": "§cYou are a Mole.\nKill all the survivors before the timer runs out.",
diff --git a/src/client/resources/assets/molehunt/lang/en_us.json b/src/client/resources/assets/molehunt/lang/en_us.json
index 0158b58..267230a 100644
--- a/src/client/resources/assets/molehunt/lang/en_us.json
+++ b/src/client/resources/assets/molehunt/lang/en_us.json
@@ -1,5 +1,5 @@
{
- "commands.molehunt.stop.failed": "The Molehunt game has not been started yet.",
+ "commands.molehunt.error.game_not_started": "The Molehunt game has not been started yet.",
"commands.molehunt.timer.show": "Showing Molehunt timer.",
"commands.molehunt.timer.hide": "Hiding Molehunt timer.",
"commands.molehunt.role.mole": "§cYou are a Mole.\nKill all the survivors before the timer runs out.",
diff --git a/src/client/resources/assets/molehunt/lang/fr_fr.json b/src/client/resources/assets/molehunt/lang/fr_fr.json
index 2836c35..62c10ca 100644
--- a/src/client/resources/assets/molehunt/lang/fr_fr.json
+++ b/src/client/resources/assets/molehunt/lang/fr_fr.json
@@ -1,5 +1,5 @@
{
- "commands.molehunt.stop.failed": "La partie de Molehunt n'a pas encore commencé.",
+ "commands.molehunt.error.game_not_started": "La partie de Molehunt n'a pas encore commencé.",
"commands.molehunt.timer.show": "Le timer est maintenant affiché.",
"commands.molehunt.timer.hide": "Le timer est maintenant caché.",
"commands.molehunt.role.mole": "§cVous êtes une taupe.\nTuez tous les survivants avant la fin de la partie..",
diff --git a/src/main/java/world/anhgelus/molehunt/Molehunt.java b/src/main/java/world/anhgelus/molehunt/Molehunt.java
index 9ae3bd1..86668e3 100644
--- a/src/main/java/world/anhgelus/molehunt/Molehunt.java
+++ b/src/main/java/world/anhgelus/molehunt/Molehunt.java
@@ -125,7 +125,7 @@ public class Molehunt implements ModInitializer {
if (game == null || !game.hasStarted()) {
player.networkHandler.sendPacket(new OverlayMessageS2CPacket(
- Text.translatable("commands.molehunt.stop.failed").formatted(Formatting.RED)
+ Text.translatable("commands.molehunt.error.game_not_started").formatted(Formatting.RED)
));
} else {
player.networkHandler.sendPacket(new OverlayMessageS2CPacket(Text.of(game.getShortRemainingText())));
@@ -142,7 +142,7 @@ public class Molehunt implements ModInitializer {
));
command.then(literal("role").requires(ServerCommandSource::isExecutedByPlayer).executes(context -> {
if (game == null || !game.hasStarted()) {
- throw (new SimpleCommandExceptionType(Text.translatable("commands.molehunt.stop.failed"))).create();
+ throw (new SimpleCommandExceptionType(Text.translatable("commands.molehunt.error.game_not_started"))).create();
}
var source = context.getSource();
@@ -165,7 +165,7 @@ public class Molehunt implements ModInitializer {
}));
command.then(literal("stop").requires(source -> source.hasPermissionLevel(1)).executes(context -> {
if (game == null || !game.hasStarted()) {
- throw (new SimpleCommandExceptionType(Text.translatable("commands.molehunt.stop.failed"))).create();
+ throw (new SimpleCommandExceptionType(Text.translatable("commands.molehunt.error.game_not_started"))).create();
}
game.stop();