geforkt von Mirrors/Paper
Implements isBedSpawn() to the PlayerRespawnEvent.
By: Rigby <rigby@onarandombox.com>
Dieser Commit ist enthalten in:
Ursprung
8c6ccaee27
Commit
d9d0416069
@ -5,10 +5,12 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
public class PlayerRespawnEvent extends PlayerEvent {
|
public class PlayerRespawnEvent extends PlayerEvent {
|
||||||
private Location respawnLocation;
|
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);
|
super(Type.PLAYER_RESPAWN, respawnPlayer);
|
||||||
this.respawnLocation = respawnLocation;
|
this.respawnLocation = respawnLocation;
|
||||||
|
this.isBedSpawn = isBedSpawn;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,4 +30,13 @@ public class PlayerRespawnEvent extends PlayerEvent {
|
|||||||
public void setRespawnLocation(Location respawnLocation) {
|
public void setRespawnLocation(Location respawnLocation) {
|
||||||
this.respawnLocation = 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren