Skip to content
Permalink
Browse files

Tweak

  • Loading branch information...
wizjany committed May 21, 2019
1 parent 7d38801 commit f666c1c0a7060077b5de629f7525377860832c69
@@ -175,10 +175,7 @@ public void onBlockBreak(BlockBreakEvent event) {

@EventHandler(ignoreCancelled = true)
public void onBlockMultiPlace(BlockMultiPlaceEvent event) {
List<Block> blocks = new ArrayList<>();
for (BlockState bs : event.getReplacedBlockStates()) {
blocks.add(bs.getBlock());
}
List<Block> blocks = event.getReplacedBlockStates().stream().map(BlockStateAsBlockFunction::apply).collect(Collectors.toList());
Events.fireToCancel(event, new PlaceBlockEvent(event, create(event.getPlayer()),
event.getBlock().getWorld(), blocks, event.getBlock().getType()));
}
@@ -255,8 +252,6 @@ public void onStructureGrowEvent(StructureGrowEvent event) {
}
}

// TODO: Handle EntityCreatePortalEvent?

@EventHandler(ignoreCancelled = true)
public void onEntityChangeBlock(EntityChangeBlockEvent event) {
Block block = event.getBlock();

0 comments on commit f666c1c

Please sign in to comment.
You can’t perform that action at this time.