From 6f65825e1504a1090405685404e7cbc59bd0f44b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Kosman?= Date: Sat, 31 Aug 2024 14:03:41 +0200 Subject: style: rename translation key --- src/client/resources/assets/molehunt/lang/en_us.json | 2 +- src/client/resources/assets/molehunt/lang/fr_fr.json | 2 +- src/main/java/world/anhgelus/molehunt/Molehunt.java | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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(); -- cgit v1.2.3