-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
🛠 Fix keep inv/exp and other bugs related to death event #5658
🛠 Fix keep inv/exp and other bugs related to death event #5658
Conversation
Well it does this because the death event Skript registers is the entity death event. I don't know if this is the correct approach to this fix. If no player is even involved in the event, it'll be misleading. Like |
Did it error at parse time before with the case you mentioned? |
It wasn't a default expression before, so it never had to grab from the event. A solution could be reading from the event, it's all a literal so it'll be able to figure out if the entity type "should" be that literal. |
How is it a default expression now? nothing has changed except the check in init method As for the event check it didn't error at parse time before because the event is indeed registered as EntityDeathEvent and the code can't know if it's PlayerDeathEvent until runtime. In addition to that, you can't know if the victim is player in init, even if you check for event params, it means nothing because users might use inner conditions to check for The current simple check for PlayerDeathEvent in |
I find #5663 to be a superior solution. |
I agree with Pickle's comment, therefore this solution (this PR) is better, is not a breaking change and more reliable that hardcoding exceptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good
Description
This bug was due to the change of how isCurrentEvent works (no super class support)
A simple change in
init
method to use EntityDeathEvent (super class) instead of PlayerDeathEvent while keeping the check for PlayerDeathEvent inexecute
methodTarget Minecraft Versions: All
Requirements: None
Related Issues: