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
186c6bcf
Commit
186c6bcf
authored
May 02, 2022
by
DancingSnow
Committed by
Melledy
May 02, 2022
Browse files
fix World level not in 0-8
parent
fba26d2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/command/commands/SetWorldLevelCommand.java
View file @
186c6bcf
...
...
@@ -3,7 +3,6 @@ package emu.grasscutter.command.commands;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.game.props.PlayerProperty
;
import
java.util.List
;
...
...
@@ -26,6 +25,10 @@ public final class SetWorldLevelCommand implements CommandHandler {
try
{
int
level
=
Integer
.
parseInt
(
args
.
get
(
0
));
if
(
level
>
8
||
level
<
0
)
{
sender
.
dropMessage
(
"World level must be between 0-8"
);
return
;
}
// Set in both world and player props
sender
.
getWorld
().
setWorldLevel
(
level
);
...
...
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