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
Hide 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;
...
@@ -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
:
...
...
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