Skip to content

chore: don't prepend FAWE prefix to WorldGuard messages #3111

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PierreSchwang
Copy link
Member

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 PierreSchwang requested a review from a team as a code owner February 13, 2025 20:17
@github-actions github-actions bot added Bugfix This PR fixes a bug chore labels Feb 13, 2025
@dordsor21
Copy link
Member

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

@PierreSchwang
Copy link
Member Author

PierreSchwang commented Feb 14, 2025

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

Copy link

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

@dordsor21
Copy link
Member

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

@PierreSchwang
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of "(FAWE)" prefix in WorldGuard messages
3 participants