Skip to content

Conversation

@T14D3
Copy link
Contributor

@T14D3 T14D3 commented Nov 26, 2024

Prevent wither explosions from breaking locked blocks (Also bumps PlaceholderAPI version because plugin won't compile otherwise)

@T14D3 T14D3 requested a review from spnda as a code owner November 26, 2024 10:50
@spnda
Copy link
Owner

spnda commented Nov 26, 2024

#320 already bumped the PAPI version. I will look at this more in detail later.

@T14D3
Copy link
Contributor Author

T14D3 commented Nov 26, 2024

Apologies, forked before that pr was merged.

@spnda
Copy link
Owner

spnda commented Nov 26, 2024

Isn't it weird that EntityExplodeEvent doesn't cover Wither explosions? That catches Creeper explosions for example... Though maybe just for being cautious this change is good to cover maybe some unknown cases. Idk how often this event is called, but given it's just a generic "change" event I would assume that it get's triggered quite often so this might again have quite a large performance impact, since we're continuously checking the protection state for any tile entity (I think).

@T14D3
Copy link
Contributor Author

T14D3 commented Nov 26, 2024

Paper has a more specific BlockDestroyEvent but if we want to maintain bukkit compat this is the only way - performance shouldn't suffer too much, have yet to see the event get called by anything but withers in my testing

@spnda spnda merged commit 54978b2 into spnda:master Dec 3, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants