Skip to content

Conversation

@OPmasterLEO
Copy link

  • Added folia support

  • Updated API

  • Small cleanup

* Added folia support

* Updated API

* Small cleanup
Copilot AI review requested due to automatic review settings August 22, 2025 13:55

This comment was marked as outdated.

@OPmasterLEO
Copy link
Author

Tested on
LeafMC 1.21.8 -> working
CanvasMC 1.21.8 -> working

@OPmasterLEO OPmasterLEO changed the title Folia Supported Add Folia Support with minimal code changes Aug 22, 2025
create a static final instance to reuse: LegacyComponentSerializer
@OPmasterLEO OPmasterLEO requested a review from Copilot August 22, 2025 14:06
Copy link

Copilot AI left a 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: true in 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);
Copy link

Copilot AI Aug 22, 2025

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.

Suggested change
return Manager.colorStringHex(s);
return manager.colorStringHex(s);

Copilot uses AI. Check for mistakes.
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)
Copy link

Copilot AI Aug 22, 2025

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.

Suggested change
- 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)

Copilot uses AI. Check for mistakes.
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)
Copy link

Copilot AI Aug 22, 2025

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.

Suggested change
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)

Copilot uses AI. Check for mistakes.
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)
Copy link

Copilot AI Aug 22, 2025

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.

Suggested change
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)

Copilot uses AI. Check for mistakes.
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.
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.

1 participant