mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-07 11:10:04 +01:00
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:
commit
e130001e16
@ -95,24 +95,15 @@ public class SetSpawnCommand extends SubCommand {
|
|||||||
if (LocationUtil.isLocationCentreOfBlock(location)) {
|
if (LocationUtil.isLocationCentreOfBlock(location)) {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (location.getBlock().getType() != Material.AIR && location.getBlock()
|
if (location.getBlock().getType() != Material.AIR && location.getBlock().getType() != Materials.MOVING_PISTON.parseMaterial()) {
|
||||||
.getType() != Materials.MOVING_PISTON.parseMaterial()) {
|
location.getBlock().breakNaturally();
|
||||||
location.getWorld().dropItemNaturally(location,
|
|
||||||
new ItemStack(location.getBlock().getType()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (location.clone().add(0.0D, 1.0D, 0.0D).getBlock()
|
if (location.clone().add(0.0D, 1.0D, 0.0D).getBlock().getType() != Material.AIR && location.getBlock().getType() != Materials.MOVING_PISTON.parseMaterial()) {
|
||||||
.getType() != Material.AIR
|
location.clone().add(0.0D, 1.0D, 0.0D).getBlock().breakNaturally();
|
||||||
&& 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()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
islandManager
|
islandManager.removeSpawnProtection(island.getLocation(world, environment));
|
||||||
.removeSpawnProtection(island.getLocation(world, environment));
|
|
||||||
}
|
}
|
||||||
}.runTask(skyblock);
|
}.runTask(skyblock);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user