From d9d041606916b02faf99278162d980cb876cc7ef Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 21 Jun 2011 04:32:47 +0100 Subject: [PATCH] Implements isBedSpawn() to the PlayerRespawnEvent. By: Rigby --- .../org/bukkit/event/player/PlayerRespawnEvent.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java index eab11e7ff3..b3d8f39295 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java @@ -5,10 +5,12 @@ import org.bukkit.entity.Player; public class PlayerRespawnEvent extends PlayerEvent { private Location respawnLocation; + private boolean isBedSpawn; - public PlayerRespawnEvent(Player respawnPlayer, Location respawnLocation) { + public PlayerRespawnEvent(Player respawnPlayer, Location respawnLocation, boolean isBedSpawn) { super(Type.PLAYER_RESPAWN, respawnPlayer); this.respawnLocation = respawnLocation; + this.isBedSpawn = isBedSpawn; } /** @@ -28,4 +30,13 @@ public class PlayerRespawnEvent extends PlayerEvent { public void setRespawnLocation(Location respawnLocation) { this.respawnLocation = respawnLocation; } + + /** + * Gets whether the respawn location is the players bed. + * + * @return true if the respawn location is the players bed. + */ + public boolean isBedSpawn() { + return this.isBedSpawn; + } }