Update translations

This commit is contained in:
Konicai 2023-09-06 17:15:44 -04:00
parent cdf06ce350
commit 821ce46909
2 changed files with 7 additions and 7 deletions

View File

@ -85,11 +85,11 @@ public class CommandRegistry {
*/
// todo: full localization
private final List<ExceptionHandler<?>> exceptionHandlers = List.of(
new ExceptionHandler<>(InvalidSyntaxException.class, (src, e) -> src.sendMessage("Invalid Command Syntax. Correct syntax is: " + e.getCorrectSyntax())),
new ExceptionHandler<>(InvalidCommandSenderException.class, (src, e) -> src.sendMessage(e.getMessage())),
new ExceptionHandler<>(NoPermissionException.class, (src, e) -> src.sendLocaleString("geyser.bootstrap.command.permission_fail")),
new ExceptionHandler<>(NoSuchCommandException.class, (src, e) -> src.sendLocaleString("geyser.bootstrap.command.not_found")),
new ExceptionHandler<>(ArgumentParseException.class, (src, e) -> src.sendMessage("Invalid Command Argument: " + e.getCause().getMessage())),
new ExceptionHandler<>(InvalidSyntaxException.class, (src, e) -> src.sendLocaleString("geyser.command.invalid_syntax", e.getCorrectSyntax())),
new ExceptionHandler<>(InvalidCommandSenderException.class, (src, e) -> src.sendLocaleString("geyser.command.invalid_sender", e.getCommandSender().getClass().getSimpleName(), e.getRequiredSender().getSimpleName())),
new ExceptionHandler<>(NoPermissionException.class, (src, e) -> src.sendLocaleString("geyser.command.permission_fail")),
new ExceptionHandler<>(NoSuchCommandException.class, (src, e) -> src.sendLocaleString("geyser.command.not_found")),
new ExceptionHandler<>(ArgumentParseException.class, (src, e) -> src.sendLocaleString("geyser.command.invalid_argument", e.getCause().getMessage())),
new ExceptionHandler<>(CommandExecutionException.class, (src, e) -> handleUnexpectedThrowable(src, e.getCause()))
);

View File

@ -42,7 +42,7 @@ public class SourceTypeProcessor implements CommandPostprocessor<GeyserCommandSo
if (meta.getOrDefault(GeyserCommand.BEDROCK_ONLY, false)) {
if (source.connection().isEmpty()) {
source.sendMessage(ChatColor.RED + GeyserLocale.getPlayerLocaleString("geyser.bootstrap.command.bedrock_only", source.locale()));
source.sendMessage(ChatColor.RED + GeyserLocale.getPlayerLocaleString("geyser.command.bedrock_only", source.locale()));
ConsumerService.interrupt();
}
} else if (meta.getOrDefault(GeyserCommand.PLAYER_ONLY, false)) {
@ -50,7 +50,7 @@ public class SourceTypeProcessor implements CommandPostprocessor<GeyserCommandSo
// performing the bedrock player check is also inherently a player check
if (source.playerUuid().isEmpty()) {
source.sendMessage(ChatColor.RED + GeyserLocale.getPlayerLocaleString("geyser.bootstrap.command.player_only", source.locale()));
source.sendMessage(ChatColor.RED + GeyserLocale.getPlayerLocaleString("geyser.command.player_only", source.locale()));
ConsumerService.interrupt();
}
}