mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-08 06:48:07 +00:00
[Fix] Persist yaw and pitch on teleport
Vanilla bukkit/MC persists yaw on teleport
This commit is contained in:
parent
6308b1ecf3
commit
b83a8eccee
2 changed files with 4 additions and 4 deletions
|
@ -54,7 +54,7 @@ public class Commandtp extends EssentialsCommand
|
|||
{
|
||||
throw new NotEnoughArgumentsException("Value of coordinates cannot be over 30000000"); //TODO: I18n
|
||||
}
|
||||
final Location location = new Location(target2.getWorld(), x, y, z);
|
||||
final Location location = new Location(target2.getWorld(), x, y, z, target2.getLocation().getYaw(), target2.getLocation().getPitch());
|
||||
if (!target2.isTeleportEnabled())
|
||||
{
|
||||
throw new Exception(_("teleportDisabled", target2.getDisplayName()));
|
||||
|
@ -115,7 +115,7 @@ public class Commandtp extends EssentialsCommand
|
|||
{
|
||||
throw new NotEnoughArgumentsException("Value of coordinates cannot be over 30000000"); //TODO: I18n
|
||||
}
|
||||
final Location location = new Location(target.getWorld(), x, y, z);
|
||||
final Location location = new Location(target.getWorld(), x, y, z, target.getLocation().getYaw(), target.getLocation().getPitch());
|
||||
target.getTeleport().now(location, false, TeleportCause.COMMAND);
|
||||
target.sendMessage(_("teleporting"));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue