1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-29 06:34:17 +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
@@ -7,15 +7,14 @@ import com.mojang.brigadier.tree.LiteralCommandNode;
import de.shiewk.smoderation.paper.util.CommandUtil;
import io.papermc.paper.command.brigadier.CommandSourceStack;
import io.papermc.paper.command.brigadier.argument.ArgumentTypes;
import net.kyori.adventure.text.Component;
import org.bukkit.entity.Player;
import java.util.Collection;
import java.util.List;
import static de.shiewk.smoderation.paper.SModerationPaper.*;
import static io.papermc.paper.command.brigadier.Commands.argument;
import static io.papermc.paper.command.brigadier.Commands.literal;
import static net.kyori.adventure.text.Component.translatable;
public final class EnderchestSeeCommand implements CommandProvider {
@@ -32,11 +31,7 @@ public final class EnderchestSeeCommand implements CommandProvider {
private int openEnderChest(CommandContext<CommandSourceStack> context) throws CommandSyntaxException {
Player sender = CommandUtil.getExecutingPlayer(context.getSource());
Player target = CommandUtil.getPlayerSingle(context, "player");
sender.sendMessage(CHAT_PREFIX.append(
Component.text("Opening ender chest of ").color(PRIMARY_COLOR)
.append(target.teamDisplayName().colorIfAbsent(SECONDARY_COLOR))
.append(Component.text("."))
));
sender.sendMessage(translatable("smod.command.ecsee.opening", target.teamDisplayName()));
sender.openInventory(target.getEnderChest());
return Command.SINGLE_SUCCESS;
}