-
Notifications
You must be signed in to change notification settings - Fork 578
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 crash if bones punched by non-player #3146
Conversation
berengma
commented
Jul 30, 2024
- Added check for player:is_player()
- if bones are fresh and the bones are punched nothing happens
- if bones are old, the inventory is dropped as entities and the bones node is removed
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.
Works. Tested with the code in #3145 (comment).
Updated PR according to code style guidelines |
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.
Tested using SmallJoker's code by setting the bone share time to a few seconds, then /killme
, then /p
(nothing happens, bones are still fresh), then after a few seconds /p
again (items are dropped).
Anyone who could do a second review ? |
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.
from my point everything is resolved
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>