Skip to content

Run blueprint-specific commands when a bundle is pasted#2852

Merged
tastybento merged 3 commits into
developfrom
copilot/run-commands-on-blueprint-paste
Mar 14, 2026
Merged

Run blueprint-specific commands when a bundle is pasted#2852
tastybento merged 3 commits into
developfrom
copilot/run-commands-on-blueprint-paste

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 14, 2026

Admins need a way to run server/player commands automatically when an island blueprint bundle is pasted (e.g., to set biomes across the island). Commands are now stored per-bundle in the bundle's JSON and executed after all worlds finish pasting.

Changes

BlueprintBundle

  • Added commands field (List<String>, @Expose) with getters/setters — serialised into the .json bundle file, editable by hand or via the new GUI

BlueprintsManager

  • After the full paste chain completes (overworld → nether → end), calls runBlueprintCommands(bb, island) on the main thread, delegating to Util.runCommands with the island owner as the target user

BlueprintManagementPanel

  • Adds a Commands button (COMMAND_BLOCK, slot 43) to the bundle edit panel
  • Clicking opens a chat conversation (CommandsPrompt) to enter commands one per line; clear resets the in-progress list; quit saves

New conversation classes

  • CommandsPrompt — collects commands line-by-line, mirrors DescriptionPrompt pattern
  • CommandsSuccessPrompt — persists the command list and reopens the bundle panel

Locale (en-US.yml)

  • Added keys under commands.admin.blueprint.management.commands.* for conversation prompts and edit-commands / no-commands for the panel button

Supported placeholders (via Util.runCommands)

Placeholder Resolves to
[player] Island owner's name
[owner] Island owner's name
[SUDO] prefix Run command as player instead of console

Example bundle JSON entry:

"commands": [
  "fillbiome [player] minecraft:the_void",
  "[SUDO]island go"
]
Original prompt

This section details on the original issue you should resolve

<issue_title>Run blueprint-specific commands when pasted</issue_title>
<issue_description>### Is your feature request related to a problem?

Want to set biomes for the whole island when pasted, not just the blocks.

Describe the solution you'd like.

Be able to run a command when the island blueprint has been pasted.

Describe alternatives you've considered.

Using blueprints.

Agreements

  • I have searched for and ensured there isn't already an open issue regarding this.
  • I have ensured the feature I'm requesting isn't already in the latest supported BentoBox build or Addons.

Other

No response</issue_description>

<agent_instructions>The commands to run can be part of the BluePrint Bundle json file and added either by hand (editing the file) or more commonly by having an icon in the Blueprint GUI to be able to add the commands by typing them into the chat. The list of commands should be one per line and support the command placeholders that BentoBox supports by standard (look at the Util.runCommands method). Note that this feature ties the commands to the blueprint rather than just making a new island. When writing any test classes make sure they are JUnit5 and therefore don't use the public method modifier if it is not required.
</agent_instructions>

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


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copilot AI changed the title [WIP] Add functionality to run blueprint-specific commands when pasted Run blueprint-specific commands when a bundle is pasted Mar 14, 2026
Copilot AI requested a review from tastybento March 14, 2026 18:13
@tastybento tastybento marked this pull request as ready for review March 14, 2026 18:59
@tastybento
Copy link
Copy Markdown
Member

@copilot Add translations for non-English locales

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
3.9% Duplication on New Code (required ≤ 3%)
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@tastybento tastybento merged commit b8d05cc into develop Mar 14, 2026
2 of 4 checks passed
@tastybento tastybento deleted the copilot/run-commands-on-blueprint-paste branch March 14, 2026 19:03
Copilot stopped work on behalf of tastybento due to an error March 14, 2026 19:03
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.

Run blueprint-specific commands when pasted

2 participants