Skip to content

Add block filtering feature with whitelist and blacklist settings#70

Merged
TWME-TW merged 2 commits into
mainfrom
block-filter
May 13, 2026
Merged

Add block filtering feature with whitelist and blacklist settings#70
TWME-TW merged 2 commits into
mainfrom
block-filter

Conversation

@TWME-TW
Copy link
Copy Markdown
Owner

@TWME-TW TWME-TW commented May 13, 2026

Introduce a block filtering mechanism that allows users to configure whitelists and blacklists for block interactions. This feature enhances control over which blocks can be manipulated using the debug stick. Update the configuration version to accommodate these changes.

Copilot AI review requested due to automatic review settings May 13, 2026 16:01
Copy link
Copy Markdown

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 introduces a configurable BlockFilter (material-level whitelist/blacklist) to control which block types the debug stick can interact with, and bumps the config version to roll out the new settings.

Changes:

  • Added BlockFilter (Whitelist/Blacklist) to config.yml and loaded it into ConfigFile.
  • Enforced block material filtering during interaction checks (via new BlockFilterUtil).
  • Added a new bypass permission (debugstickpro.bypassblockfilter) and bumped CONFIG_VERSION to 7.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/main/resources/plugin.yml Adds the debugstickpro.bypassblockfilter permission and wires it into the admin permission group.
src/main/resources/config.yml Bumps ConfigVersion to 7 and introduces BlockFilter whitelist/blacklist configuration.
src/main/java/dev/twme/debugstickpro/utils/BlockFilterUtil.java New utility implementing whitelist/blacklist + permission bypass logic for materials.
src/main/java/dev/twme/debugstickpro/utils/AutoCheckCanChangeUtil.java Applies BlockFilter as part of the “can change block” gating logic.
src/main/java/dev/twme/debugstickpro/mode/copy/CopyLeftClick.java Import ordering only (no behavioral change).
src/main/java/dev/twme/debugstickpro/mode/classic/ClassicLeftClick.java Adds BlockFilter enforcement for classic left-click selection.
src/main/java/dev/twme/debugstickpro/DebugStickPro.java Updates CONFIG_VERSION constant to 7 and expands listener imports explicitly.
src/main/java/dev/twme/debugstickpro/config/ConfigLoader.java Loads new BlockFilter settings from YAML into ConfigFile.
src/main/java/dev/twme/debugstickpro/config/ConfigFile.java Adds new ConfigFile.BlockFilter configuration structure.

Comment thread src/main/java/dev/twme/debugstickpro/utils/AutoCheckCanChangeUtil.java Outdated
Comment thread src/main/java/dev/twme/debugstickpro/utils/BlockFilterUtil.java Outdated
Comment thread src/main/resources/config.yml
Comment thread src/main/resources/plugin.yml Outdated
@TWME-TW TWME-TW merged commit 12bb135 into main May 13, 2026
1 check 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