Slimefun / Slimefun4

Slimefun 4 - A unique Spigot/Paper plugin that looks and feels like a modpack. We've been giving you backpacks, jetpacks, reactors and much more since 2013.
GNU General Public License v3.0
964 stars 547 forks source link

Fix not disappearing holograms #4197

Open EpicPlayerA10 opened 4 months ago

EpicPlayerA10 commented 4 months ago

Description

Fixes not disappearing holograms caused by delayed hologram placement when called from async ( https://github.com/Slimefun/Slimefun4/issues/3176#issuecomment-1025863596 )

Proposed changes

Related Issues (if applicable)

Checklist

github-actions[bot] commented 4 months ago

Your Pull Request was automatically labelled as: "✨ Fix" Thank you for contributing to this project! ❤️

JustAHuman-xD commented 4 months ago

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!

github-actions[bot] commented 4 months ago

Slimefun preview build

A Slimefun preview build is available for testing! Commit: dd164ef3

https://preview-builds.walshy.dev/download/Slimefun/4197/dd164ef3

Note: This is not a supported build and is only here for the purposes of testing. Do not run this on a live server and do not report bugs anywhere but this PR!

EpicPlayerA10 commented 4 months ago

Only other thing that may or may not be a problem is the removal of the exception catching and therein logging

The error will be logged by java anyway because the thrown exception from getHologram will be propagated to the stacktrace. I think it is better to throw exception and stop execution of further code where getHologram was called, than only printing error in the console and allowing further code execution while creating undefined behaviour.