Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package zorg.esinia.server.events;
- import org.spongepowered.api.event.Listener;
- import org.spongepowered.api.event.block.ChangeBlockEvent;
- //class name and main method
- public class EventDecay {
- //listener for event
- @Listener
- //event for changeblock decay event
- public void onDecay(ChangeBlockEvent.Decay e){
- //gets all the transactions during the event and loops them and sets their validity to false
- e.getTransactions().forEach(t -> t.setValid(false));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment