Skip to content

Commit

Permalink
Disabled the onModifyBlock event
Browse files Browse the repository at this point in the history
  • Loading branch information
zessirb committed Jul 30, 2018
1 parent 3a5139a commit f979fa4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/onaple/epicboundaries/EpicBoundaries.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ public void onWorldCopy(CopyWorldEvent event) {
* Cancel every modify block events that "open" something
* @param event Modify event
*/
@Listener
/*@Listener
public void onModifyBlock(ChangeBlockEvent.Modify event, @First Player player) {
if (!player.gameMode().equals(GameModes.CREATIVE)) {
for (Transaction<BlockSnapshot> transaction : event.getTransactions()) {
BlockSnapshot snapshot = transaction.getOriginal();
snapshot.getState().getTrait("open").ifPresent(openProperty -> event.setCancelled(true));
}
}
}
}*/
}

0 comments on commit f979fa4

Please sign in to comment.