use of com.sk89q.worldedit.patterns.SingleBlockPattern in project Skree by Skelril.
the class SkyWarsInstance method showStartingPlatform.
private void showStartingPlatform(boolean present) {
Location<World> platformLocation = startingLocation.add(0, -1, 0);
EditSession editor = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new WorldResolver(getRegion().getExtent()).getWorldEditWorld(), -1);
com.sk89q.worldedit.Vector origin = new com.sk89q.worldedit.Vector(platformLocation.getX(), platformLocation.getY(), platformLocation.getZ());
BaseBlock targetBlock;
if (present) {
targetBlock = WorldEdit.getInstance().getBaseBlockFactory().getBaseBlock(BlockID.STAINED_GLASS, 15);
} else {
targetBlock = WorldEdit.getInstance().getBaseBlockFactory().getBaseBlock(BlockID.AIR);
}
try {
editor.makeCylinder(origin, new SingleBlockPattern(targetBlock), 12, 1, true);
} catch (MaxChangedBlocksException e) {
e.printStackTrace();
}
}
Aggregations