mirror of
https://github.com/Melledy/Grasscutter.git
synced 2025-02-03 00:05:22 +00:00
Attempt to fix !givechar
This commit is contained in:
parent
69cb03f4d4
commit
c728b9f5fe
@ -186,12 +186,12 @@ public final class PlayerCommands {
|
||||
}
|
||||
|
||||
@Command(label = "givechar", aliases = {"givec"},
|
||||
usage = "Usage: givechar <player|avatarId> [avatarId] [level]")
|
||||
usage = "Usage: givechar <player|avatarId> [level|avatarId] [level]")
|
||||
public static class GiveCharCommand implements CommandHandler {
|
||||
@Override public void execute(GenshinPlayer player, List<String> args) {
|
||||
int target, avatarId, level = 1, ascension = 1;
|
||||
|
||||
if(args.size() < 2) {
|
||||
if(args.size() < 1) {
|
||||
CommandHandler.sendMessage(player, "Usage: givechar <player> <avatarId> [level]");
|
||||
return;
|
||||
}
|
||||
@ -204,7 +204,8 @@ public final class PlayerCommands {
|
||||
try {
|
||||
target = Integer.parseInt(args.get(0));
|
||||
if(Grasscutter.getGameServer().getPlayerByUid(target) == null) {
|
||||
target = player.getUid(); level = Integer.parseInt(args.get(1));
|
||||
target = player.getUid();
|
||||
level = Integer.parseInt(args.get(1));
|
||||
avatarId = Integer.parseInt(args.get(0));
|
||||
} else {
|
||||
avatarId = Integer.parseInt(args.get(1));
|
||||
|
Loading…
Reference in New Issue
Block a user