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
7bac86ed
Commit
7bac86ed
authored
Apr 18, 2022
by
Melledy
Browse files
Add !changescene command
parent
be89a609
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/commands/PlayerCommands.java
View file @
7bac86ed
...
...
@@ -325,4 +325,20 @@ public class PlayerCommands {
player
.
getInventory
().
removeItems
(
toRemove
);
}
}
@Command
(
aliases
=
{
"scene"
},
helpText
=
"/Changescene [Scene id]"
)
public
static
class
ChangeScene
extends
PlayerCommand
{
@Override
public
void
execute
(
GenshinPlayer
player
,
String
raw
)
{
int
sceneId
=
0
;
try
{
sceneId
=
Integer
.
parseInt
(
raw
);
}
catch
(
Exception
e
)
{
return
;
}
player
.
getWorld
().
transferPlayerToScene
(
player
,
sceneId
,
player
.
getPos
());
}
}
}
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