Dragons now throw events when creating portals

By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
CraftBukkit/Spigot 2012-01-15 12:00:38 +00:00
parent fd9c7e7c07
commit 876c2db682

View File

@ -0,0 +1,29 @@
package org.bukkit.craftbukkit.util;
import java.util.List;
import org.bukkit.World;
import org.bukkit.block.BlockState;
public class BlockStateListPopulator {
private final World world;
private final List<BlockState> list;
public BlockStateListPopulator(World world, List<BlockState> list) {
this.world = world;
this.list = list;
}
public void setTypeId(int x, int y, int z, int type) {
BlockState state = world.getBlockAt(x, y, z).getState();
state.setTypeId(type);
list.add(state);
}
public List<BlockState> getList() {
return list;
}
public World getWorld() {
return world;
}
}