Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
24b1fd20
Commit
24b1fd20
authored
Apr 20, 2022
by
Melledy
Committed by
GitHub
Apr 20, 2022
Browse files
Merge pull request #65 from fengyuecanzhu/development
args check for setstats command
parents
fc6f2441
7fcaa97a
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/command/commands/SetStatsCommand.java
View file @
24b1fd20
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment