mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
added chunk coordinates to /loc
This commit is contained in:
parent
88d7859b6b
commit
da446ff7f7
1 changed files with 5 additions and 1 deletions
|
|
@ -258,7 +258,11 @@ class PlayerAPI{
|
|||
$level = $issuer->entity->level->getName();
|
||||
$compass = [0 => "X+", 1 => "Z+", 2 => "X-", 3 => "Z-", null => "null"];
|
||||
$direction = $compass[$issuer->entity->getDirection()];
|
||||
return "Your coordinates: X: $x, Y: $y, Z: $z, world: $level.\nDirection: $direction";
|
||||
|
||||
$xChunk = $x >> 4;
|
||||
$zChunk = $z >> 4;
|
||||
|
||||
return "Your coordinates: X: $x ($xChunk), Y: $y, Z: $z ($zChunk), world: $level.\nDirection: $direction";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue