mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-05 16:49:39 +00:00
Implements isBedSpawn() to the PlayerRespawnEvent.
This commit is contained in:
parent
e3462769c1
commit
af7d0410f3
1 changed files with 12 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue