Commit 24b1fd20 authored by Melledy's avatar Melledy Committed by GitHub
Browse files

Merge pull request #65 from fengyuecanzhu/development

args check for setstats command
parents fc6f2441 7fcaa97a
...@@ -10,7 +10,7 @@ import emu.grasscutter.server.packet.send.PacketEntityFightPropUpdateNotify; ...@@ -10,7 +10,7 @@ import emu.grasscutter.server.packet.send.PacketEntityFightPropUpdateNotify;
import java.util.List; import java.util.List;
@Command(label = "setstats", usage = "setstats|stats <stat> <value>", @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 { public final class SetStatsCommand implements CommandHandler {
@Override @Override
...@@ -20,6 +20,11 @@ public final class SetStatsCommand implements CommandHandler { ...@@ -20,6 +20,11 @@ public final class SetStatsCommand implements CommandHandler {
return; return;
} }
if (args.size() < 2){
CommandHandler.sendMessage(sender, "Usage: setstats|stats <stat> <value>");
return;
}
String stat = args.get(0); String stat = args.get(0);
switch (stat) { switch (stat) {
default: default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment