package com.plotsquared.bukkit.util; import java.util.ArrayList; import java.util.Collection; import org.bukkit.Chunk; import org.bukkit.World; import com.intellectualcrafters.plot.object.ChunkLoc; import com.intellectualcrafters.plot.util.BlockUpdateUtil; public abstract class BukkitSetBlockManager extends BlockUpdateUtil { public static BukkitSetBlockManager setBlockManager = null; public abstract void set(final org.bukkit.World world, final int x, final int y, final int z, final int blockId, final byte data); public abstract void update(Collection list); @Override public void update(final String worldname, final Collection chunkLocs) { final World world = BukkitUtil.getWorld(worldname); final ArrayList chunks = new ArrayList(); for (final ChunkLoc loc : chunkLocs) { chunks.add(world.getChunkAt(loc.x, loc.z)); } setBlockManager.update(chunks); } }