mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-27 15:22:37 +02:00
Let Bukkit decide if a bedspawn is valid or not.
Bukkit's bed fix forces minimum bukkit change.
This commit is contained in:
parent
20b9111495
commit
705b193450
@ -69,7 +69,7 @@ import org.yaml.snakeyaml.error.YAMLException;
|
|||||||
|
|
||||||
public class Essentials extends JavaPlugin implements IEssentials
|
public class Essentials extends JavaPlugin implements IEssentials
|
||||||
{
|
{
|
||||||
public static final int BUKKIT_VERSION = 2586;
|
public static final int BUKKIT_VERSION = 2624;
|
||||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||||
private transient ISettings settings;
|
private transient ISettings settings;
|
||||||
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
|
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
|
||||||
|
@ -354,7 +354,7 @@ public class Teleport implements Runnable, ITeleport
|
|||||||
{
|
{
|
||||||
final Player player = user.getBase();
|
final Player player = user.getBase();
|
||||||
Location bed = player.getBedSpawnLocation();
|
Location bed = player.getBedSpawnLocation();
|
||||||
if (bed != null && bed.getBlock().getType() == Material.BED_BLOCK)
|
if (bed != null)
|
||||||
{
|
{
|
||||||
now(new Target(bed), cause);
|
now(new Target(bed), cause);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public class Commandhome extends EssentialsCommand
|
|||||||
if ("bed".equalsIgnoreCase(homeName) && user.isAuthorized("essentials.home.bed"))
|
if ("bed".equalsIgnoreCase(homeName) && user.isAuthorized("essentials.home.bed"))
|
||||||
{
|
{
|
||||||
final Location bed = player.getBedSpawnLocation();
|
final Location bed = player.getBedSpawnLocation();
|
||||||
if (bed != null && bed.getBlock().getType() == Material.BED_BLOCK)
|
if (bed != null)
|
||||||
{
|
{
|
||||||
user.getTeleport().teleport(bed, charge, TeleportCause.COMMAND);
|
user.getTeleport().teleport(bed, charge, TeleportCause.COMMAND);
|
||||||
throw new NoChargeException();
|
throw new NoChargeException();
|
||||||
|
@ -49,7 +49,7 @@ public class EssentialsSpawnPlayerListener implements Listener
|
|||||||
{
|
{
|
||||||
Location home;
|
Location home;
|
||||||
final Location bed = user.getBedSpawnLocation();
|
final Location bed = user.getBedSpawnLocation();
|
||||||
if (bed != null && bed.getBlock().getType() == Material.BED_BLOCK)
|
if (bed != null)
|
||||||
{
|
{
|
||||||
home = bed;
|
home = bed;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user