Merge pull request #65 from fengyuecanzhu/development

args check for setstats command
This commit is contained in:
Melledy 2022-04-20 22:05:58 -07:00 committed by GitHub
commit 24b1fd2045

View File

@ -10,7 +10,7 @@ import emu.grasscutter.server.packet.send.PacketEntityFightPropUpdateNotify;
import java.util.List;
@Command(label = "setstats", usage = "setstats|stats <stat> <value>",
aliases = {"stats"})
description = "Set fight property for your current active character", aliases = {"stats"}, permission = "player.setstats")
public final class SetStatsCommand implements CommandHandler {
@Override
@ -20,6 +20,11 @@ public final class SetStatsCommand implements CommandHandler {
return;
}
if (args.size() < 2){
CommandHandler.sendMessage(sender, "Usage: setstats|stats <stat> <value>");
return;
}
String stat = args.get(0);
switch (stat) {
default: