-
Notifications
You must be signed in to change notification settings - Fork 549
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 not disappearing holograms #4197
base: master
Are you sure you want to change the base?
Fix not disappearing holograms #4197
Conversation
Your Pull Request was automatically labelled as: "✨ Fix" |
I’ll try and test and review this today, long standing bug but if it’s being called async that would make sense as to why it does that weird behavior, thanks for the PR! |
Slimefun preview buildA Slimefun preview build is available for testing! https://preview-builds.walshy.dev/download/Slimefun/4197/dd164ef3
|
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/holograms/HologramsService.java
Outdated
Show resolved
Hide resolved
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.
Only other thing that may or may not be a problem is the removal of the exception catching and therein logging
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/holograms/HologramsService.java
Show resolved
Hide resolved
The error will be logged by java anyway because the thrown exception from |
Description
Fixes not disappearing holograms caused by delayed hologram placement when called from async ( #3176 (comment) )
Proposed changes
HologramsService#updateHologram
to allows calls only from sync code. Calls from async code should not be allowed as this on its own causes undefined behaviour. For example theHologramsService#removeHologram
function already does not allow async.HologramOwner#updateHologram
to allow calls from async code. ChecksisDeletedSoon
to be sure that the hologram owner still exists.Related Issues (if applicable)
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values