Merge branch 'development' into 'master'

Build 73_1, fix block duplication with island spawn

See merge request Songoda/fabledskyblock!9
This commit is contained in:
Brianna O'Keefe 2019-04-15 03:44:03 +00:00
commit e130001e16

View File

@ -95,24 +95,15 @@ public class SetSpawnCommand extends SubCommand {
if (LocationUtil.isLocationCentreOfBlock(location)) {
new BukkitRunnable() {
public void run() {
if (location.getBlock().getType() != Material.AIR && location.getBlock()
.getType() != Materials.MOVING_PISTON.parseMaterial()) {
location.getWorld().dropItemNaturally(location,
new ItemStack(location.getBlock().getType()));
if (location.getBlock().getType() != Material.AIR && location.getBlock().getType() != Materials.MOVING_PISTON.parseMaterial()) {
location.getBlock().breakNaturally();
}
if (location.clone().add(0.0D, 1.0D, 0.0D).getBlock()
.getType() != Material.AIR
&& location.getBlock().getType() != Materials.MOVING_PISTON
.parseMaterial()) {
location.getWorld().dropItemNaturally(
location.clone().add(0.0D, 1.0D, 0.0D),
new ItemStack(location.clone().add(0.0D, 1.0D, 0.0D)
.getBlock().getType()));
if (location.clone().add(0.0D, 1.0D, 0.0D).getBlock().getType() != Material.AIR && location.getBlock().getType() != Materials.MOVING_PISTON.parseMaterial()) {
location.clone().add(0.0D, 1.0D, 0.0D).getBlock().breakNaturally();
}
islandManager
.removeSpawnProtection(island.getLocation(world, environment));
islandManager.removeSpawnProtection(island.getLocation(world, environment));
}
}.runTask(skyblock);
} else {