SHARE
TWEET

Untitled

a guest Jan 26th, 2020 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top