Death Counter (Forge)

Death Counter (Forge)

2M Downloads

Why is the LivingDeathEvent processing player deaths on the lowest priority?

HoldYourWaffle opened this issue · 11 comments

commented

The LivingDeathEvent processing player deaths has the lowest priority, is there a reason for that?

Asking because I'm making a server-side addon mod that puts the leaderboard in chat everytime someone dies. With the lowest priority however, I can't execute my event handler after your mod has processed the death fully.

commented

My problem is that I can't hook into DC's behavior at the LivingDeathEvent after it has processed the death.

My use case:
I want to execute the dc leaderboard all command everytime someone dies. If my event handler has a higher/the same priority as yours it'll be processed before DC has increased it's death count, thus displaying a wrong leaderboard. To fix this your event handler must have a higher priority than mine.

commented
commented

I moved it up to low would that be okay? This way it still allows for other mods to hook into DC's behavior.

commented
commented
commented

So what do you think? Moving your priority up by one or do you know of a better way to solve this.
(I understand this is kinof "dirty" because as you said, DC doesn't do anything by itself so it should have a low priority.)

commented
commented

It's 'adl'

I published the mod here: AutoDeathLeaderboard

commented
commented

I could also create a PR that adds ADL's functionality to your mod (with a configuration option of course), that seems like a more clean and simpeler solution.

commented

I have no idea why that commit references this issue, it should be #3 🤔