Skip to content

Add configurable wartime block lists for placeable, breakable, and interactable blocks#1955

Draft
Copilot wants to merge 3 commits intodevelopfrom
copilot/add-configurable-war-interactions
Draft

Add configurable wartime block lists for placeable, breakable, and interactable blocks#1955
Copilot wants to merge 3 commits intodevelopfrom
copilot/add-configurable-war-interactions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 22, 2026

Currently wartime block control is all-or-nothing: enableWartimeBlockDestruction allows destroying ALL blocks, and laddersPlaceableInEnemyFactionTerritory only covers ladders. There's no way to allow e.g. scaffolding placement + door interaction without opening up full block destruction.

Adds three config lists under war.items that grant granular per-block-type permissions in enemy territory during war:

war:
  items:
    placeable: [LADDER, SCAFFOLDING]
    breakable: [LADDER, SCAFFOLDING]
    interactable: [OAK_DOOR, STONE_BUTTON, OAK_FENCE_GATE]

Changes

  • MfClaimService — New isWartimeBlockActionAllowed(playerId, claim, blockTypeName, configPath) method. Extracted shared war-status logic into private isAtWarWith() helper (deduplicates from isWartimeLadderPlacementAllowed).
  • BlockBreakListener — Falls through to war.items.breakable check before cancelling
  • BlockPlaceListener — Checks war.items.placeable alongside existing ladder-specific logic
  • PlayerInteractListener — Checks war.items.interactable after ladder placement check
  • config.yml — New war.items section with three empty lists (backwards compatible)
  • CONFIG.md — Documents all three options with examples
  • Tests — Added cases for wartime breakable/interactable allow and deny paths

These lists work alongside the existing boolean toggles — enableWartimeBlockDestruction still overrides everything, and laddersPlaceableInEnemyFactionTerritory still works independently.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • hub.spigotmc.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=256m (dns block)
  • jitpack.io
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=256m (dns block)
  • repo.dansplugins.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=256m (dns block)
  • repo.extendedclip.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=256m (dns block)
  • repo.mikeprimm.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=256m (dns block)
  • repo.rpkit.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=256m (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature] A configurable list of blocks that become breakable/placeable/interactable during war</issue_title>
<issue_description>## Is your feature request related to a problem?
Currently, the only thing that changes when you declare war on another faction, is that you can place ladders in enemy territory (if that option is enabled). Or, if you have wartime block destruction enabled, ANY block can be destroyed in enemy territory, but you don't get to choose which blocks. It's just all of them.

Being able to use ladders in war makes wars more immersive, as ladders have historically been used to climb walls in castle sieges. But what about scaffolding? What about being able to open wooden doors or press buttons to open iron doors?

I personally would like for it to be possible to configure the plugin so that attackers in a war can use your buttons, doors, fence gates, etc. AND be able to place/break scaffolding. But not break other blocks.

Describe the solution you'd like

A possible solution is to add 3 lists of blocks to the config under war settings.
Placeable: A list of blocks that become placeable in enemy territory during a war
Breakable: A list of blocks that become breakable in enemy territory during a war
Interactable: A list of blocks that become interactable in enemy territory during a war</issue_description>

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


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI and others added 2 commits March 22, 2026 20:25
…teractable blocks

Add war.items.placeable, war.items.breakable, and war.items.interactable
config lists that allow server admins to specify which blocks can be
placed, broken, or interacted with in enemy territory during war.

- Add isWartimeBlockActionAllowed() to MfClaimService
- Update BlockBreakListener to check war.items.breakable list
- Update BlockPlaceListener to check war.items.placeable list
- Update PlayerInteractListener to check war.items.interactable list
- Add config entries to config.yml and document in CONFIG.md
- Add tests for new wartime block action functionality

Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Dans-Plugins/Medieval-Factions/sessions/9a502860-9de7-449d-b5ae-49699b06b841
…ockPlaceListener

Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Dans-Plugins/Medieval-Factions/sessions/9a502860-9de7-449d-b5ae-49699b06b841
Copilot AI changed the title [WIP] Add configurable list of interactive blocks during war Add configurable wartime block lists for placeable, breakable, and interactable blocks Mar 22, 2026
Copilot AI requested a review from dmccoystephenson March 22, 2026 20:27
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

3 participants