3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 02:20:07 +01:00

In WorldGuard, teleport/spawn location yaw/pitch should now work.

Dieser Commit ist enthalten in:
TomyLobo 2012-03-12 16:40:02 +01:00
Ursprung b8e9f6bb77
Commit 85cdd49593

Datei anzeigen

@ -28,7 +28,13 @@ import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.Server;
import org.bukkit.World;
import com.sk89q.worldedit.*;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.BlockWorldVector;
import com.sk89q.worldedit.LocalWorld;
import com.sk89q.worldedit.Location;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldVector;
public class BukkitUtil {
private BukkitUtil() {
@ -122,8 +128,12 @@ public class BukkitUtil {
public static final double EQUALS_PRECISION = 0.0001;
public static org.bukkit.Location toLocation(Location teleportLocation) {
final LocalWorld world = teleportLocation.getWorld();
return toLocation(toWorld(world), teleportLocation.getPosition());
Vector pt = teleportLocation.getPosition();
return new org.bukkit.Location(
toWorld(teleportLocation.getWorld()),
pt.getX(), pt.getY(), pt.getZ(),
teleportLocation.getYaw(), teleportLocation.getPitch()
);
}
public static World toWorld(final LocalWorld world) {