Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add event wrappers #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Pablete1234
Copy link
Member

A small idea we could implement, would make it easier for us, since we can pass helpful information into the event directly, like the match that event corresponds to, or maybe pass the team (player container) the player that triggered that event is in, instead of trying to get that information in every module independently

@twizmwazin
Copy link
Member

I really like this idea, but I think we could expand it quite a bit. An idea is perhaps to split from Bukkit's event system and create our own, and have modules listen to that rather than Bukkit's event channels. We could implement inheritance-based event listening, like sponge's event system. And we could allow any module to attatch metadata to the event as well.

@ElliottWhyman
Copy link
Member

@twizmwazin could you expand upon what you mean by inheritance-based event listening. I don't follow

@Pablete1234
Copy link
Member Author

@ElliottWhyman where you can have a listener for "PlayerEvent" and it will be called with any event that extends player event

@ElliottWhyman
Copy link
Member

Oh I see, we should definitely look into our event bus system

@twizmwazin
Copy link
Member

The argument against our own system is that it disregards Bukkit's system.

@ElliottWhyman
Copy link
Member

perhaps just some changes upstream in sportbukkit to make it work the way we would like it whilst keeping the pre existing bukkit integration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants