geforkt von Mirrors/Paper
Only remove blocks when golem is successfully spawned. Fixes BUKKIT-1094
By: feildmaster <admin@feildmaster.com>
Dieser Commit ist enthalten in:
Ursprung
eaf42d8b35
Commit
a90a7edd76
@ -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;
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren