Using annotation key translation

This commit is contained in:
方块君
2022-05-08 14:44:14 +08:00
committed by Melledy
parent ef3579da82
commit 3a5503de72
40 changed files with 53 additions and 227 deletions

View File

@@ -17,7 +17,7 @@ import java.util.regex.Pattern;
import static emu.grasscutter.utils.Language.translate;
@Command(label = "give", usage = "give <itemId|itemName> [amount] [level]", aliases = {
"g", "item", "giveitem"}, permission = "player.give")
"g", "item", "giveitem"}, permission = "player.give", description = "commands.give.description")
public final class GiveCommand implements CommandHandler {
Pattern lvlRegex = Pattern.compile("l(?:vl?)?(\\d+)"); // Java is a joke of a proglang that doesn't have raw string literals
Pattern refineRegex = Pattern.compile("r(\\d+)");
@@ -31,11 +31,6 @@ public final class GiveCommand implements CommandHandler {
return -1;
}
@Override
public String description() {
return translate("commands.give.description");
}
@Override
public void execute(Player sender, Player targetPlayer, List<String> args) {
if (targetPlayer == null) {