FastAsyncWorldEdit icon indicating copy to clipboard operation
FastAsyncWorldEdit copied to clipboard

chore: don't prepend FAWE prefix to WorldGuard messages

Open PierreSchwang opened this issue 10 months ago • 5 comments

Overview

Fixes #3110

Description

Checks if the caller is WorldGuard, and don't prepend the (FAWE) prefix to the message. Requires hidden frames for stuff like https://github.com/EngineHub/WorldGuard/blob/version/7.0.x/worldguard-core/src/main/java/com/sk89q/worldguard/commands/region/RegionCommands.java#L496

### Submitter Checklist
- [x] Make sure you are opening from a topic branch (**/feature/fix/docs/ branch** (right side)) and not your main branch.
- [x] Ensure that the pull request title represents the desired changelog entry.
- [x] New public fields and methods are annotated with `@since TODO`.
- [x] I read and followed the [contribution guidelines](https://github.com/IntellectualSites/.github/blob/main/CONTRIBUTING.md).

PierreSchwang avatar Feb 13 '25 20:02 PierreSchwang

Is it potentially better to search for it only being WE/FAWE ? This could be a problem on some addon plugins, but I can't see it being an issue if we ensure users know what plugin their brush/etc is from

dordsor21 avatar Feb 14 '25 09:02 dordsor21

Yeah, sounds more reasonable. Can just dropWhile com.sk89q.we / com.fawe and check if the next / first frame is Bukkit I guess

PierreSchwang avatar Feb 14 '25 09:02 PierreSchwang

Please take a moment and address the merge conflicts of your pull request. Thanks!

github-actions[bot] avatar Apr 30 '25 15:04 github-actions[bot]

Quick thought, is it worth adding an overload to skip having to stack walk when we know messages are from FAWE (somehow?)

dordsor21 avatar May 18 '25 10:05 dordsor21

Could be possible - would have to look further into it.

iirc, I also tried to implement the more generic approach (like, don't just handle WG but also other third party plugins) - but there has been some reason why that did not work (don't remember what it was exactly tbf, could've been the builtin stuff like message boxes). But WG alone would be fine as well ig

PierreSchwang avatar May 18 '25 12:05 PierreSchwang