Skip to content

feat: Configurable radius for OBSIDIAN_SCOOPING flag#2856

Merged
tastybento merged 3 commits intodevelopfrom
copilot/configure-obsidian-scooping-radius
Mar 14, 2026
Merged

feat: Configurable radius for OBSIDIAN_SCOOPING flag#2856
tastybento merged 3 commits intodevelopfrom
copilot/configure-obsidian-scooping-radius

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 14, 2026

The OBSIDIAN_SCOOPING flag had a hardcoded 2-block radius for the nearby-obsidian check, with no way to tune it per server. This adds a BentoBox-wide config setting for that radius and surfaces it in player-facing messages.

Changes

Settings.java

  • New island.obsidian-scooping-radius config option (int, default 2, valid range 0–15)
  • Setter clamps values to [0, 15]
  • Setting to 0 disables the nearby check entirely — any lone obsidian can be scooped

ObsidianScoopingListener.java

  • Reads radius from Settings instead of the hardcoded 2
  • Skips the nearby-obsidian check when radius == 0
  • Passes [radius] as a text variable to the obsidian-nearby message
# config.yml
island:
  obsidian-scooping-radius: 2  # 0 disables the restriction

Locales

  • en-US: obsidian-nearby reworded to "…within a [radius]-block radius…"; description updated to say "the configured radius" instead of "a 2-block radius"
  • All 22 other locale files: ([radius]) appended to obsidian-nearby so the radius value is always visible to players regardless of language
Original prompt

This section details on the original issue you should resolve

<issue_title>Configurable radius for OBSIDIAN_SCOOPING flag</issue_title>
<issue_description>### Description

Is your feature request related to a problem?

A discussion on Discord with an admin raised some misconceptions of the OBSIDIAN_SCOOPING flag, namely a vague explanation of what the flag does and an insufficient feedback to the player that does not let him know why he could not scoop up the obsidian block. Those have already been fixed in this commit (f04a4fb).

It appeared, though, that there was some lack of understanding about how the OBSIDIAN_SCOOPING flag worked overall. Most notably, the fact that there must not be any other obsidian block within a 2-block radius of where the block is.

Describe the solution you'd like us to implement.

To further improve the solution to that issue, I suggest that we add a configurable radius for the OBSIDIAN_SCOOPING flag. It will bring some more customization capabilities, even allowing the admin to get rid of that restriction.

Following are the specifications of this feature:

  • Config option allowing to set the radius within a (0..15) range.
  • [radius] text-variable in the protection.flags.OBSIDIAN_SCOOPING.obsidian-nearby message.
  • Edit the OBSIDIAN_SCOOPING flag description to not mention the 2-block radius rather the config-defined radius.

Questions are:

  • Should it be a BentoBox setting or a gamemode one?

Describe alternatives you've considered.

None.

Additional context

None.</issue_description>

<agent_instructions>make the radisu a setting in BentoBox config.yml and edit the text for the flag to include the placeholder across all locales.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@tastybento I'd prefer BentoBox so it's consistent across game modes. If the idea is to reduce confusion then it should be consistent. But also, if that's the goal, then it'd be better if there's just one standard across all servers. Does this really have to be configurable? Won't that just cause more questions? "On XYZ server it works, but here is doesn't, why admin?"

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI and others added 2 commits March 14, 2026 19:27
- Add `obsidianScoopingRadius` config setting (0-15, default 2) to Settings.java
  under path `island.obsidian-scooping-radius`
- Update ObsidianScoopingListener to read radius from settings, use it in
  getBlocksAround(), and pass [radius] variable to obsidian-nearby message
- When radius is 0, skip the nearby-obsidian check entirely
- Update en-US.yml: add [radius] to obsidian-nearby message, update description
  to say 'the configured radius' instead of '2-block radius'
- Update all 22 other locale files to include [radius] in obsidian-nearby message

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…ve en-US message phrasing

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copilot AI changed the title [WIP] Add configurable radius for OBSIDIAN_SCOOPING flag feat: Configurable radius for OBSIDIAN_SCOOPING flag Mar 14, 2026
Copilot AI requested a review from tastybento March 14, 2026 19:31
@tastybento tastybento marked this pull request as ready for review March 14, 2026 19:49
@sonarqubecloud
Copy link
Copy Markdown

@tastybento tastybento merged commit ec8f42f into develop Mar 14, 2026
3 checks passed
@tastybento tastybento deleted the copilot/configure-obsidian-scooping-radius branch March 14, 2026 20:05
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.

Configurable radius for OBSIDIAN_SCOOPING flag

2 participants