mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
acc7e2172b
sorry for messy commit,doing via tablet on ssh md_5
32 lines
1.8 KiB
Diff
32 lines
1.8 KiB
Diff
From 6ed59638e19ee1a9234500789a38e74de0167d4e Mon Sep 17 00:00:00 2001
|
|
From: EdGruberman <ed@rjump.com>
|
|
Date: Tue, 12 Feb 2013 16:17:31 -0700
|
|
Subject: [PATCH] Remove dependency on CraftPlayer.getBedSpawnLocation; Fixes BUKKIT-3604
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/PlayerList.java | 9 ++++++++-
|
|
1 files changed, 8 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
|
index d212080..126b177 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
|
@@ -491,7 +491,14 @@ public abstract class PlayerList {
|
|
if (exitWorld != null) {
|
|
if ((cause == TeleportCause.END_PORTAL) && (i == 0)) {
|
|
// THE_END -> NORMAL; use bed if available, otherwise default spawn
|
|
- exit = ((org.bukkit.craftbukkit.entity.CraftPlayer) entityplayer.getBukkitEntity()).getBedSpawnLocation();
|
|
+ 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();
|
|
}
|
|
--
|
|
1.7.0.4
|
|
|