mirror of
https://github.com/essentials/Essentials.git
synced 2025-02-24 08:22:56 +01:00
If bed home is set, give priority when spawning.
This commit is contained in:
parent
72885e1d6c
commit
e82ee71bd9
@ -34,15 +34,15 @@ public class EssentialsSpawnPlayerListener implements Listener
|
||||
|
||||
if (ess.getSettings().getRespawnAtHome())
|
||||
{
|
||||
Location home = user.getHome(user.getLocation());
|
||||
if (home == null)
|
||||
Location home;
|
||||
final Location bed = user.getBedSpawnLocation();
|
||||
if (bed != null && bed.getBlock().getType() == Material.BED_BLOCK)
|
||||
{
|
||||
final Location bed = user.getBedSpawnLocation();
|
||||
if (bed.getBlock().getType() == Material.BED_BLOCK)
|
||||
{
|
||||
home = bed;
|
||||
}
|
||||
|
||||
home = bed;
|
||||
}
|
||||
else
|
||||
{
|
||||
home = user.getHome(user.getLocation());
|
||||
}
|
||||
if (home != null)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user