forked from SteamWar/SteamWar
@@ -36,7 +36,7 @@ import lombok.Data;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.craftbukkit.v1_20_R1.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -128,7 +128,7 @@ public class PortalCommand extends SWCommand {
|
||||
private Location locationOfPlayer(Player player) {
|
||||
Location l = player.getLocation();
|
||||
|
||||
l.setYaw(((CraftPlayer)player).getHandle().cm());
|
||||
l.setYaw(((CraftPlayer)player).getHandle().getYHeadRot());
|
||||
return l;
|
||||
}
|
||||
|
||||
@@ -189,6 +189,6 @@ public class PortalCommand extends SWCommand {
|
||||
}
|
||||
|
||||
private Location adapt(World world, BlockVector3 blockVector3) {
|
||||
return new Location(world, blockVector3.getBlockX() + 0.5, blockVector3.getBlockY(), blockVector3.getBlockZ() + 0.5);
|
||||
return new Location(world, blockVector3.x() + 0.5, blockVector3.y(), blockVector3.z() + 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user