Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. @Listener
  2. public void onBlockBreak(ChangeBlockEvent.Break evt, @Root Player player) {
  3.     //go through all changes (will mostly be only one)
  4.     for (Transaction<BlockSnapshot> tr : evt.getTransactions()) {
  5.         //check if the original state was a LOG
  6.         if (tr.getOriginal().getState().getType() != BlockTypes.LOG) {
  7.             //if not, set the transaction invalid
  8.             tr.setValid(false);
  9.         }
  10.     }
  11. }