diff options
Diffstat (limited to 'src')
4 files changed, 7 insertions, 10 deletions
diff --git a/src/client/resources/assets/molehunt/lang/en_us.json b/src/client/resources/assets/molehunt/lang/en_us.json index 7d882e4..3a50d81 100644 --- a/src/client/resources/assets/molehunt/lang/en_us.json +++ b/src/client/resources/assets/molehunt/lang/en_us.json @@ -8,7 +8,7 @@ "molehunt.game.end.suspense.title": "§eAnd the winners are...", "molehunt.game.end.winners.moles.title": "§cThe Moles!", "molehunt.game.end.winners.survivors.title": "§aNot the Moles!", - "molehunt.game.end.winners.subtitle": "§6The Moles were ", + "molehunt.game.end.winners.subtitle": "§6The Moles were", "molehunt.game.start.suspense": "§eYou are...", "molehunt.game.start.mole.title": "§cThe Mole!", "molehunt.game.start.mole.subtitle": "§eGet the list of moles with §6/molehunt moles", diff --git a/src/client/resources/assets/molehunt/lang/fr_fr.json b/src/client/resources/assets/molehunt/lang/fr_fr.json index cfd52d8..bb73ca8 100644 --- a/src/client/resources/assets/molehunt/lang/fr_fr.json +++ b/src/client/resources/assets/molehunt/lang/fr_fr.json @@ -8,7 +8,7 @@ "molehunt.game.end.suspense.title": "§eEt les gagnants sont...", "molehunt.game.end.winners.moles.title": "§cLes Taupes !", "molehunt.game.end.winners.survivors.title": "§aPas les Taupes !", - "molehunt.game.end.winners.subtitle": "§Les Taupes sont ", + "molehunt.game.end.winners.subtitle": "§Les Taupes sont", "molehunt.game.start.suspense": "§eVous êtes...", "molehunt.game.start.mole.title": "§cLa Taupe !", "molehunt.game.start.mole.subtitle": "§eRécupérer la liste des taupes avec §6/molehunt moles", diff --git a/src/main/java/world/anhgelus/molehunt/Game.java b/src/main/java/world/anhgelus/molehunt/Game.java index ce6f335..dbe7ebd 100644 --- a/src/main/java/world/anhgelus/molehunt/Game.java +++ b/src/main/java/world/anhgelus/molehunt/Game.java @@ -133,7 +133,9 @@ public class Game { } else {
winner = new TitleS2CPacket(Text.translatable("molehunt.game.end.winners.survivors.title"));
}
- pm.sendToAll(new SubtitleS2CPacket(Text.translatable("molehunt.game.end.winners.subtitle").append(getMolesAsString())));
+ pm.sendToAll(new SubtitleS2CPacket(Text.translatable("molehunt.game.end.winners.subtitle")
+ .append(" " + getMolesAsString()))
+ );
pm.sendToAll(winner);
pm.sendToAll(timing);
moles.clear();
diff --git a/src/main/java/world/anhgelus/molehunt/Molehunt.java b/src/main/java/world/anhgelus/molehunt/Molehunt.java index c6ce7c7..d7c0d58 100644 --- a/src/main/java/world/anhgelus/molehunt/Molehunt.java +++ b/src/main/java/world/anhgelus/molehunt/Molehunt.java @@ -117,13 +117,8 @@ public class Molehunt implements ModInitializer { return Command.SINGLE_SUCCESS; }) )); - command.then(literal("moles").executes(context -> { - final var source = context.getSource(); - if (game == null || !game.isAMole(source.getPlayer())) { - source.sendFeedback(() -> Text.translatable("commands.molehunt.moles.list.deny"),false); - return Command.SINGLE_SUCCESS; - } - source.sendFeedback(() -> Text.translatable("commands.molehunt.moles.list").append(" " + game.getMolesAsString()),false); + command.then(literal("moles").requires(source -> game != null && game.isAMole(source.getPlayer())).executes(context -> { + context.getSource().sendFeedback(() -> Text.translatable("commands.molehunt.moles.list").append(" " + game.getMolesAsString()),false); return Command.SINGLE_SUCCESS; })); command.then(literal("stop").requires(source -> source.hasPermissionLevel(1)).executes(context -> { |
