AgentSanchez / SeriousVote

Vote Listener For Sponge
3 stars 4 forks source link

VoteProcessedEvent #42

Closed curscascis closed 2 years ago

curscascis commented 3 years ago

@ijo42 had made a PR to add in support for magi bridge. This is out of the scope of SeriousVote and I will instead be creating an event which includes all the details pertinent to doing something with a vote after SV has processed it. It will include.

The event will probably be SeriousVote.events.VoteProcessedEvent

ijo42 commented 3 years ago

Seems good,thanks

AgentSanchez commented 2 years ago

I have added the features mentioned above. Other plugins can listen in for the event. It is not cancellable.

@Listener
public void onVoteProcessed(VoteProcessedEvent e) {
     System.out.println(e.getPlayerName() + " has voted on " + e.getVoteSite();
     //Some other plugin's code here 
}

closed by 642c57aa3f3561bba68195a6371d5b9dcc94f7c1

see

https://github.com/AgentSanchez/SeriousVote/blob/642c57aa3f3561bba68195a6371d5b9dcc94f7c1/src/main/java/net/adamsanchez/seriousvote/events/VoteProcessedEvent.java#L16