BetterAlias

BetterAlias

32k Downloads

Event priority

NotJustPizza opened this issue ยท 5 comments

commented

Is possible to add higher priority in Event Listener? I think BetterAlias is more important than other plugins. We can use it for add and replace or block some important commands.

commented

I suppose that makes sense; I'll see what I can do this weekend.

commented

Not a class, but you could create one method that does the work and then create a wrapper for each event priority that calls the base method.

Just pass the event along.

commented

@Ne0nx3r0 How to change annotation @eventhandler(priority = EventPriority.LOWEST, ignoreCancelled = true) to dynamic code? Should I create new class for each priority? Or should I allow selection from all priorities for each command. Have you better idea?

commented

It shouldn't be too big of a problem, though you'll have to implement something to make sure it only fires once / on the right priority.

commented

So, bigger number of handlers is not issue. I try implement this.