Skip to content

Commit

Permalink
Prevent growth instead of general block change
Browse files Browse the repository at this point in the history
  • Loading branch information
zessirb committed Jul 24, 2018
1 parent adbfc73 commit 57a342c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/java/com/onaple/harvester/HarvestListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ public void onBlockBreakEvent(ChangeBlockEvent.Break event) {
}

/**
* prevent wheat growing.
* @param event
* Prevent growing event
* @param event Event happening when stuff grows
*/
@Listener
public void onBlockGrowEvent(ChangeBlockEvent.Modify event){
//event.getTransactions().stream().forEach(blockSnapshotTransaction -> Harvester.getLogger().info(blockSnapshotTransaction.getDefault().toString()));
public void onBlockGrowEvent(ChangeBlockEvent.Modify.Grow event){
event.setCancelled(true);
}

Expand Down

0 comments on commit 57a342c

Please sign in to comment.