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
c42fa4ee
Commit
c42fa4ee
authored
Apr 20, 2022
by
Jaida Wu
Browse files
Add pos command
Signed-off-by:
Jaida Wu
<
mlgmxyysd@meowcat.org
>
parent
b44df66c
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/command/commands/Pos.java
0 → 100644
View file @
c42fa4ee
package
emu.grasscutter.command.commands
;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.game.GenshinPlayer
;
import
java.util.List
;
@Command
(
label
=
"pos"
,
usage
=
"Usage: pos"
,
description
=
"Get coordinates."
)
public
class
Pos
implements
CommandHandler
{
@Override
public
void
onCommand
(
GenshinPlayer
sender
,
List
<
String
>
args
)
{
if
(
sender
==
null
)
{
CommandHandler
.
sendMessage
(
null
,
"Run this command in-game."
);
return
;
}
sender
.
dropMessage
(
String
.
format
(
"Coord: %.3f, %.3f, %.3f"
,
sender
.
getPos
().
getX
(),
sender
.
getPos
().
getY
(),
sender
.
getPos
().
getZ
()));
}
}
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