Let Bukkit decide if a bedspawn is valid or not.

Bukkit's bed fix forces minimum bukkit change.
This commit is contained in:
KHobbits 2013-02-01 02:59:40 +00:00
parent 20b9111495
commit 705b193450
4 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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);
} }

View File

@ -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();

View File

@ -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;
} }