mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-15 16:34:56 +01:00
Using annotation key translation
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user