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
d3889501
Commit
d3889501
authored
Apr 20, 2022
by
Melledy
Committed by
GitHub
Apr 20, 2022
Browse files
Merge pull request #47 from alt3ri/patch-3
Adding /pos
parents
fda20501
aeb335c8
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/commands/PlayerCommands.java
View file @
d3889501
...
...
@@ -574,6 +574,17 @@ public final class PlayerCommands {
}
}
@Command
(
label
=
"pos"
,
usage
=
"Usage: pos"
,
description
=
"Get coordinates."
,
execution
=
Command
.
Execution
.
PLAYER
)
public
static
class
CordCommand
implements
CommandHandler
{
@Override
public
void
execute
(
GenshinPlayer
player
,
List
<
String
>
args
)
{
player
.
dropMessage
(
String
.
format
(
"Coord: %.3f, %.3f, %.3f"
,
player
.
getPos
().
getX
(),
player
.
getPos
().
getY
(),
player
.
getPos
().
getZ
()));
}
}
@Command
(
label
=
"restart"
,
usage
=
"Usage: restart"
,
description
=
"Restarts the current session"
,
execution
=
Command
.
Execution
.
PLAYER
,
permission
=
"player.restart"
)
public
static
class
RestartCommand
implements
CommandHandler
{
@Override
...
...
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