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/main/java/world/anhgelus/molehunt/Molehunt.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/world') 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