Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package org.bukkit.event.player;
2
3import org.bukkit.Location;
4import org.bukkit.entity.Player;
5
6public class PlayerRespawnEvent extends PlayerEvent {
7 private Location respawnLocation;
8 private boolean isBedSpawn;
9
10 public PlayerRespawnEvent(Player respawnPlayer, Location respawnLocation, boolean isBedSpawn) {
11 super(Type.PLAYER_RESPAWN, respawnPlayer);
12 this.respawnLocation = respawnLocation;
13 this.isBedSpawn = isBedSpawn;
14 }
15
16 /**
17 * Gets the current respawn location
18 *
19 * @return Location current respawn location
20 */
21 public Location getRespawnLocation() {
22 return this.respawnLocation;
23 }
24
25 /**
26 * Sets the new respawn location
27 *
28 * @param respawnLocation new location for the respawn
29 */
30 public void setRespawnLocation(Location respawnLocation) {
31 this.respawnLocation = respawnLocation;
32 }
33
34 /**
35 * Gets whether the respawn location is the player's bed.
36 *
37 * @return true if the respawn location is the player's bed.
38 */
39 public boolean isBedSpawn() {
40 return this.isBedSpawn;
41 }
42}