geforkt von Mirrors/FastAsyncWorldEdit
In WorldGuard, teleport/spawn location yaw/pitch should now work.
Dieser Commit ist enthalten in:
Ursprung
b8e9f6bb77
Commit
85cdd49593
@ -28,7 +28,13 @@ import org.bukkit.block.BlockFace;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.World;
|
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 {
|
public class BukkitUtil {
|
||||||
private BukkitUtil() {
|
private BukkitUtil() {
|
||||||
@ -122,8 +128,12 @@ public class BukkitUtil {
|
|||||||
public static final double EQUALS_PRECISION = 0.0001;
|
public static final double EQUALS_PRECISION = 0.0001;
|
||||||
|
|
||||||
public static org.bukkit.Location toLocation(Location teleportLocation) {
|
public static org.bukkit.Location toLocation(Location teleportLocation) {
|
||||||
final LocalWorld world = teleportLocation.getWorld();
|
Vector pt = teleportLocation.getPosition();
|
||||||
return toLocation(toWorld(world), 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) {
|
public static World toWorld(final LocalWorld world) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren