Only remove blocks when golem is successfully spawned. Fixes BUKKIT-1094

By: feildmaster <admin@feildmaster.com>
This commit is contained in:
CraftBukkit/Spigot 2012-03-10 23:01:39 -06:00
parent eaf42d8b35
commit a90a7edd76

View file

@ -1,5 +1,6 @@
package org.bukkit.craftbukkit.util;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.World;
import org.bukkit.block.BlockState;
@ -8,6 +9,10 @@ public class BlockStateListPopulator {
private final World world;
private final List<BlockState> list;
public BlockStateListPopulator(World world) {
this(world, new ArrayList<BlockState>());
}
public BlockStateListPopulator(World world, List<BlockState> list) {
this.world = world;
this.list = list;
@ -19,6 +24,12 @@ public class BlockStateListPopulator {
list.add(state);
}
public void updateList() {
for (BlockState state : list) {
state.update(true);
}
}
public List<BlockState> getList() {
return list;
}