1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-28 05:54:16 +02:00

Internationalization support

This commit is contained in:
Shy
2025-07-30 13:37:30 +02:00
parent a17086b059
commit 2be16da939
31 changed files with 470 additions and 483 deletions
@@ -40,7 +40,7 @@ public final class MuteCommand implements CommandProvider {
private int muteWithoutReason(CommandContext<CommandSourceStack> context) throws CommandSyntaxException {
if (SModerationPaper.CONFIG.shouldForceReason()){
CommandUtil.error("Please provide a reason.");
CommandUtil.errorTranslatable("smod.command.mute.fail.forceReason");
}
UUID sender = CommandUtil.getSenderUUID(context.getSource());
UUID target = context.getArgument("player", UUID.class);
@@ -60,11 +60,11 @@ public final class MuteCommand implements CommandProvider {
public static void executeMute(UUID sender, UUID target, long duration, String reason) throws CommandSyntaxException {
if (sender.equals(target)) {
CommandUtil.error("You can't mute yourself.");
CommandUtil.errorTranslatable("smod.command.mute.fail.self");
} else {
Player targetPlayer = Bukkit.getPlayer(target);
if (targetPlayer != null && targetPlayer.hasPermission("smod.preventmute")){
CommandUtil.error("This player can't be muted.");
CommandUtil.errorTranslatable("smod.command.mute.fail.protect");
} else {
final Punishment punishment = Punishment.mute(
System.currentTimeMillis(),