mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 21:19:00 +01:00
Fixed player teleportation
This commit is contained in:
parent
2be5181b0c
commit
bf304ddc43
@ -5,6 +5,7 @@ import net.minecraft.server.WorldServer;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@ -105,6 +106,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
}
|
||||
|
||||
public void teleportTo(Location location) {
|
||||
entity.world = ((CraftWorld)location.getWorld()).getHandle();
|
||||
entity.b(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ import net.minecraft.server.EntityPlayer;
|
||||
import net.minecraft.server.Packet;
|
||||
import net.minecraft.server.Packet3Chat;
|
||||
import net.minecraft.server.Packet6SpawnPosition;
|
||||
import net.minecraft.server.WorldServer;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -62,11 +63,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
entity.a.b(new Packet3Chat(message));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void teleportTo(Location location) {
|
||||
entity.a.a(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return name;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user