2013-05-04 01:24:15 +02:00
|
|
|
From 11b3b6b9add95dce5e0cbf9073b3bdd6bf04dd86 Mon Sep 17 00:00:00 2001
|
2013-03-01 23:17:52 +01:00
|
|
|
From: EdGruberman <ed@rjump.com>
|
|
|
|
Date: Tue, 12 Feb 2013 16:17:31 -0700
|
2013-04-10 04:36:11 +02:00
|
|
|
Subject: [PATCH] Remove dependency on CraftPlayer.getBedSpawnLocation; Fixes
|
|
|
|
BUKKIT-3604
|
2013-03-01 23:17:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
2013-05-04 01:24:15 +02:00
|
|
|
index 169fa90..5ccc7f0 100644
|
2013-03-01 23:17:52 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
2013-05-04 01:24:15 +02:00
|
|
|
@@ -495,7 +495,14 @@ public abstract class PlayerList {
|
2013-03-01 23:17:52 +01:00
|
|
|
if (exitWorld != null) {
|
|
|
|
if ((cause == TeleportCause.END_PORTAL) && (i == 0)) {
|
2013-03-25 08:57:00 +01:00
|
|
|
// THE_END -> NORMAL; use bed if available, otherwise default spawn
|
|
|
|
- exit = ((org.bukkit.craftbukkit.entity.CraftPlayer) entityplayer.getBukkitEntity()).getBedSpawnLocation();
|
2013-03-01 23:17:52 +01:00
|
|
|
+ ChunkCoordinates chunkcoordinates = entityplayer.getBed();
|
|
|
|
+ CraftWorld spawnWorld = (CraftWorld) this.server.server.getWorld(entityplayer.spawnWorld);
|
|
|
|
+ if (spawnWorld != null && chunkcoordinates != null) {
|
|
|
|
+ ChunkCoordinates chunkcoordinates1 = EntityHuman.getBed(spawnWorld.getHandle(), chunkcoordinates, entityplayer.isRespawnForced());
|
|
|
|
+ if (chunkcoordinates1 != null) {
|
|
|
|
+ exit = new Location(spawnWorld, chunkcoordinates1.x + 0.5, chunkcoordinates1.y, chunkcoordinates1.z + 0.5);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
if (exit == null || ((CraftWorld) exit.getWorld()).getHandle().dimension != 0) {
|
|
|
|
exit = exitWorld.getWorld().getSpawnLocation();
|
|
|
|
}
|
|
|
|
--
|
2013-04-10 04:36:11 +02:00
|
|
|
1.8.2.1
|
2013-03-01 23:17:52 +01:00
|
|
|
|