diff options
author | Rigby <rigby@onarandombox.com> | 2011-06-21 04:33:29 +0100 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-06-21 00:21:11 -0400 |
commit | 06483020784d4cbe20fda911d1a703bc7a42c183 (patch) | |
tree | ff373b1aa3ed0486e92d386e37cefc7639f4b26c /src/main | |
parent | 138c70183d9c45d21b9fa9e5917ded2d8aadfa28 (diff) | |
download | craftbukkit-06483020784d4cbe20fda911d1a703bc7a42c183.tar craftbukkit-06483020784d4cbe20fda911d1a703bc7a42c183.tar.gz craftbukkit-06483020784d4cbe20fda911d1a703bc7a42c183.tar.lz craftbukkit-06483020784d4cbe20fda911d1a703bc7a42c183.tar.xz craftbukkit-06483020784d4cbe20fda911d1a703bc7a42c183.zip |
Implements isBedSpawn() to the PlayerRespawnEvent.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/net/minecraft/server/ServerConfigurationManager.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java index b419642d..6ec5bd92 100644 --- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java +++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java @@ -217,10 +217,12 @@ public class ServerConfigurationManager { EntityPlayer entityplayer1 = entityplayer; if (location == null) { + boolean isBedSpawn = false; CraftWorld cw = (CraftWorld) this.server.server.getWorld(entityplayer.spawnWorld); if (cw != null && chunkcoordinates != null) { ChunkCoordinates chunkcoordinates1 = EntityHuman.getBed(cw.getHandle(), chunkcoordinates); if (chunkcoordinates1 != null) { + isBedSpawn = true; location = new Location(cw, chunkcoordinates1.x + 0.5, chunkcoordinates1.y, chunkcoordinates1.z + 0.5); } else { entityplayer1.netServerHandler.sendPacket(new Packet70Bed(0)); @@ -234,7 +236,7 @@ public class ServerConfigurationManager { } Player respawnPlayer = cserver.getPlayer(entityplayer); - PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location); + PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn); cserver.getPluginManager().callEvent(respawnEvent); location = respawnEvent.getRespawnLocation(); |