Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Grasscutter
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
ziqian zhang
Grasscutter
Commits
186c6bcf
Commit
186c6bcf
authored
3 years ago
by
DancingSnow
Committed by
Melledy
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix World level not in 0-8
parent
fba26d2d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/emu/grasscutter/command/commands/SetWorldLevelCommand.java
+4
-1
4 additions, 1 deletion
...mu/grasscutter/command/commands/SetWorldLevelCommand.java
with
4 additions
and
1 deletion
src/main/java/emu/grasscutter/command/commands/SetWorldLevelCommand.java
+
4
−
1
View file @
186c6bcf
...
@@ -3,7 +3,6 @@ package emu.grasscutter.command.commands;
...
@@ -3,7 +3,6 @@ package emu.grasscutter.command.commands;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.game.props.PlayerProperty
;
import
java.util.List
;
import
java.util.List
;
...
@@ -26,6 +25,10 @@ public final class SetWorldLevelCommand implements CommandHandler {
...
@@ -26,6 +25,10 @@ public final class SetWorldLevelCommand implements CommandHandler {
try
{
try
{
int
level
=
Integer
.
parseInt
(
args
.
get
(
0
));
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
// Set in both world and player props
sender
.
getWorld
().
setWorldLevel
(
level
);
sender
.
getWorld
().
setWorldLevel
(
level
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment