summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-02-05 20:25:28 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-02-07 01:45:32 +0000
commitbf304ddc439484ce17b083ba667f2eb37aa54ea7 (patch)
tree01de533dd524d13f2dbec145f5011c57673cd587 /src/main/java
parent2be5181b0c721baf520a372350693377c261dd37 (diff)
downloadcraftbukkit-bf304ddc439484ce17b083ba667f2eb37aa54ea7.tar
craftbukkit-bf304ddc439484ce17b083ba667f2eb37aa54ea7.tar.gz
craftbukkit-bf304ddc439484ce17b083ba667f2eb37aa54ea7.tar.lz
craftbukkit-bf304ddc439484ce17b083ba667f2eb37aa54ea7.tar.xz
craftbukkit-bf304ddc439484ce17b083ba667f2eb37aa54ea7.zip
Fixed player teleportation
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 99326530..eff30aba 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -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());
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a62de87f..f01c67f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -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;
}