summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2011-12-12 02:51:12 -0500
committerEvilSeph <evilseph@gmail.com>2011-12-12 02:55:20 -0500
commit322330e9420c5fc91e014d4015a6280e35a06787 (patch)
treec00295dee291b18da3d9a035bffa2bc7ec163370 /src/main
parentd7d48d822953a7fee67f3542d32ada7ead0c1054 (diff)
downloadcraftbukkit-322330e9420c5fc91e014d4015a6280e35a06787.tar
craftbukkit-322330e9420c5fc91e014d4015a6280e35a06787.tar.gz
craftbukkit-322330e9420c5fc91e014d4015a6280e35a06787.tar.lz
craftbukkit-322330e9420c5fc91e014d4015a6280e35a06787.tar.xz
craftbukkit-322330e9420c5fc91e014d4015a6280e35a06787.zip
Fixed players not receiving movement packets after trying to leave The End. Fixes BUKKIT-289.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/net/minecraft/server/NetServerHandler.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java
index 3c4f9e81..ecf05ffe 100644
--- a/src/main/java/net/minecraft/server/NetServerHandler.java
+++ b/src/main/java/net/minecraft/server/NetServerHandler.java
@@ -9,6 +9,7 @@ import org.bukkit.ChatColor;
import org.bukkit.craftbukkit.ChunkCompressionThread;
import org.bukkit.Location;
import org.bukkit.command.CommandException;
+import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.block.CraftBlock;
import org.bukkit.craftbukkit.entity.CraftPlayer;
import org.bukkit.craftbukkit.event.CraftEventFactory;
@@ -924,7 +925,10 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
public void a(Packet9Respawn packet9respawn) {
if (this.player.j) {
- this.player = this.minecraftServer.serverConfigurationManager.moveToWorld(this.player, 0, true);
+ CraftWorld cworld = (CraftWorld) this.server.getWorlds().get(0);
+ ChunkCoordinates chunkcoordinates = cworld.getHandle().getSpawn();
+ Location location = new Location(cworld, chunkcoordinates.x + 0.5, chunkcoordinates.y, chunkcoordinates.z + 0.5);
+ this.player = this.minecraftServer.serverConfigurationManager.moveToWorld(this.player, 0, true, location);
} else {
if (this.player.getHealth() > 0) {
return;
@@ -932,7 +936,10 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
this.player = this.minecraftServer.serverConfigurationManager.moveToWorld(this.player, 0, false);
}
- this.getPlayer().setHandle(this.player); // CraftBukkit
+ // CraftBukkit start
+ this.getPlayer().setHandle(this.player);
+ this.player.j = false; // allow the player to receive movement packets again.
+ // CraftBukkit end
}
public void a(Packet101CloseWindow packet101closewindow) {