diff --git a/src/ca/gibstick/discosheep/DiscoParty.java b/src/ca/gibstick/discosheep/DiscoParty.java index af11f40..a869561 100644 --- a/src/ca/gibstick/discosheep/DiscoParty.java +++ b/src/ca/gibstick/discosheep/DiscoParty.java @@ -15,6 +15,8 @@ import org.bukkit.entity.Player; import org.bukkit.entity.Sheep; import org.bukkit.FireworkEffect; import org.bukkit.FireworkEffect.Builder; +import org.bukkit.block.Block; +import org.bukkit.block.BlockState; import org.bukkit.entity.Entity; import org.bukkit.event.HandlerList; import org.bukkit.inventory.meta.FireworkMeta; @@ -67,6 +69,8 @@ public class DiscoParty { private Player player; private ArrayList sheepList = new ArrayList(); private ArrayList guestList = new ArrayList(); + private ArrayList floorBlockCache = new ArrayList(); + private ArrayList floorBlocks = new ArrayList(); private HashMap guestNumbers = new HashMap(); private boolean doFireworks = false; private boolean doJump = true; @@ -291,8 +295,12 @@ public class DiscoParty { for (Entity guest : getGuestList()) { guest.remove(); } + for(BlockState block : this.floorBlockCache){ + block.update(true); + } getSheepList().clear(); getGuestList().clear(); + floorBlockCache.clear(); } // Set a random colour for all sheep in array