Ghaz-ranka

Untitled

May 20th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. package zorg.esinia.server.events;
  2.  
  3. import org.spongepowered.api.event.Listener;
  4. import org.spongepowered.api.event.block.ChangeBlockEvent;
  5. //class name and main method
  6. public class EventDecay {
  7. //listener for event
  8. @Listener
  9. //event for changeblock decay event
  10. public void onDecay(ChangeBlockEvent.Decay e){
  11. //gets all the transactions during the event and loops them and sets their validity to false
  12. e.getTransactions().forEach(t -> t.setValid(false));
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment