diff options
author | Rigby <rigby@onarandombox.com> | 2011-06-21 04:32:47 +0100 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-06-20 23:55:19 -0400 |
commit | af7d0410f3492dae9757b33ce96824fd3d77353b (patch) | |
tree | 035a80354d9d11bb476ce6ba97caeadae5e949cc /src/main | |
parent | e3462769c127b7502849a9878d295f9d92a0cd97 (diff) | |
download | bukkit-af7d0410f3492dae9757b33ce96824fd3d77353b.tar bukkit-af7d0410f3492dae9757b33ce96824fd3d77353b.tar.gz bukkit-af7d0410f3492dae9757b33ce96824fd3d77353b.tar.lz bukkit-af7d0410f3492dae9757b33ce96824fd3d77353b.tar.xz bukkit-af7d0410f3492dae9757b33ce96824fd3d77353b.zip |
Implements isBedSpawn() to the PlayerRespawnEvent.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java b/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java index eab11e7f..b3d8f392 100644 --- a/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java +++ b/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; + } } |