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