Event Priority System - An idea [Obsolete]

This is my idea for an event priority system.
Before IDragonfire links me to the “Sponge should have X!” Thread, I will add that this is a useful addition to the API.
I plan to use an interface with setPriority(), override() methods.
I wasn’t a fan of Bukkit priorities, so I thought:

No, I link you to Sponge Core Overview:

Btw. What is your idea?
Sponge has something similar to Bukkit Priorities:


PS.: Next time please use @IDragonfire

1 Like

Edited until I get to my computer

Can’t really tell by looking at that source, but will these priorities be registered via annotations?

@ButterDev I can’t really think of a reason to have setPriority() as a thing. I’m not sure it’s a good idea to let an Event change that mid-call or something.

Look into the event folder:

Yes, over annotation.

1 Like

That’s an interesting order system and seems better detailed than Bukkit’s. But I think someone should make an example event with a bunch of fake plugin ideas that would listen to them.

PRE - no idea what this would be used for
AFTER_PRE - same here
FIRST - Protection plugin cancels the event
EARLY - AdminPlugin uncancels the event because was done by user X but changes property Y
DEFAULT - Chat plugin tells staff that player did something
LATE - Beautifuller plugin changes the chat output to look better
LAST - Other protection plugin verifies if the area is protected
BEFORE_POST - ?? profit
POST - Logging plugin writes to log what happened