-
Notifications
You must be signed in to change notification settings - Fork 14
Add Folia Support with minimal code changes #14
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
base: master
Are you sure you want to change the base?
Conversation
* Added folia support * Updated API * Small cleanup
|
Tested on |
create a static final instance to reuse: LegacyComponentSerializer
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.
Pull Request Overview
This PR adds Folia support to the ChatFilter plugin while maintaining backward compatibility with Paper/Spigot servers. The changes modernize the plugin to support newer Minecraft API versions and incorporate the UniversalScheduler library to handle scheduling differences between server implementations.
- Added Folia compatibility with
folia-supported: truein plugin.yml - Integrated UniversalScheduler library to handle task scheduling across different server implementations
- Updated API version from 1.13 to 1.21 and modernized Maven dependencies
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| plugin.yml | Updated to use Maven properties and added Folia support flag |
| ChatFilter.java | Added scheduler abstraction and legacy color serialization |
| pom.xml | Updated dependencies to Paper API 1.21.8 and added UniversalScheduler |
| Multiple listener files | Removed unused imports for code cleanup |
| README.md | Added comprehensive documentation and disclaimer about Folia support |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| public String colour(String s) { | ||
| if (manager.supported("hex")) { | ||
| return manager.colorStringHex(s); | ||
| return Manager.colorStringHex(s); |
Copilot
AI
Aug 22, 2025
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.
The method call Manager.colorStringHex(s) should be manager.colorStringHex(s) to maintain consistency with the instance variable usage pattern in this class.
| return Manager.colorStringHex(s); | |
| return manager.colorStringHex(s); |
README.md
Outdated
| - `chatfilter.bypass.caps` –Allows the player to bypass chat decapping | ||
| - `chatfilter.bypass.pause` – Allows the player to bypass paused chat | ||
| - `chatfilter.bypass.swear` – Allows the player to bypass all swear filters (chat ,books, commands etc) | ||
| - chatfilter.bypass.swear.<config entry>` – Allows the player to bypass set config entries (chat ,books, commands etc) |
Copilot
AI
Aug 22, 2025
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.
Missing opening backtick before 'chatfilter.bypass.swear.' - should be chatfilter.bypass.swear.<config entry> for consistency with other permission entries.
| - chatfilter.bypass.swear.<config entry>` – Allows the player to bypass set config entries (chat ,books, commands etc) | |
| - `chatfilter.bypass.swear.<config entry>` – Allows the player to bypass set config entries (chat ,books, commands etc) |
README.md
Outdated
| - `chatfilter.bypass.swear` – Allows the player to bypass all swear filters (chat ,books, commands etc) | ||
| - chatfilter.bypass.swear.<config entry>` – Allows the player to bypass set config entries (chat ,books, commands etc) | ||
| - chatfilter.bypass.ip.<config entry>` – Allows the player to bypass set config entries (chat ,books, commands etc) | ||
| chatfilter.bypass.ip` – Allows the player to bypass all ip filters (chat ,books, commands etc) |
Copilot
AI
Aug 22, 2025
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.
Missing opening backtick before 'chatfilter.bypass.ip.' - should be chatfilter.bypass.ip.<config entry> for consistency with other permission entries.
| chatfilter.bypass.ip` – Allows the player to bypass all ip filters (chat ,books, commands etc) | |
| - `chatfilter.bypass.swear.<config entry>` – Allows the player to bypass set config entries (chat ,books, commands etc) | |
| - `chatfilter.bypass.ip.<config entry>` – Allows the player to bypass set config entries (chat ,books, commands etc) | |
| - `chatfilter.bypass.ip` – Allows the player to bypass all ip filters (chat ,books, commands etc) |
README.md
Outdated
| - `chatfilter.bypass.swear` – Allows the player to bypass all swear filters (chat ,books, commands etc) | ||
| - chatfilter.bypass.swear.<config entry>` – Allows the player to bypass set config entries (chat ,books, commands etc) | ||
| - chatfilter.bypass.ip.<config entry>` – Allows the player to bypass set config entries (chat ,books, commands etc) | ||
| chatfilter.bypass.ip` – Allows the player to bypass all ip filters (chat ,books, commands etc) |
Copilot
AI
Aug 22, 2025
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.
Missing opening backtick and dash formatting before 'chatfilter.bypass.ip' - should be - chatfilter.bypass.ip` for consistency with other permission entries.
| chatfilter.bypass.ip` – Allows the player to bypass all ip filters (chat ,books, commands etc) | |
| - `chatfilter.bypass.ip` – Allows the player to bypass all ip filters (chat ,books, commands etc) |
Improves import and blacklist/whitelist commands for better argument handling and duplicate removal, refactors event listeners for clarity and performance, and optimizes string similarity and font detection logic. Updates Java version to 21 in pom.xml and introduces a compiled URL pattern for efficiency. Also cleans up imports and code structure across multiple files.
Added folia support
Updated API
Small cleanup