Skip to content

Prevent block breaks outside the border#93

Merged
pop4959 merged 1 commit intopop4959:masterfrom
Warriorrrr:feat/prevent-block-break
Aug 12, 2025
Merged

Prevent block breaks outside the border#93
pop4959 merged 1 commit intopop4959:masterfrom
Warriorrrr:feat/prevent-block-break

Conversation

@Warriorrrr
Copy link
Contributor

Closes #87

Adds a block break event and implements it on all platforms, tested it on bukkit but not the others.

I noticed that other platforms were missing the place event so I added it to (neo)forge, couldn't find a simple way to implement it on fabric.

Copy link
Owner

@pop4959 pop4959 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, tentatively, but will wait on merging until I have time to test this.

@Warriorrrr Warriorrrr force-pushed the feat/prevent-block-break branch from ab5f33a to dda131c Compare August 11, 2025 12:40
Copy link
Owner

@pop4959 pop4959 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, pending testing, although one question: I notice there is some work done towards parity here with the various events on Fabric/Forge/Neo. This is great, however I did notice Fabric seems to be missing a place event handler. Was this overlooked, or some issue with impl there?

@Warriorrrr
Copy link
Contributor Author

I couldn't find a simple way to accomplish it in fabric, so I left it out of this one hoping that somebody with better knowledge in that area might add it in the future.

I've tested this on fabric/forge/neoforge now and they all pass, I did the following steps each time:

  • op myself
  • chunky center
  • chunky radius 10
  • chunky border add
  • deop
  • walk to border, try breaking blocks behind it, notice it's prevented
  • give myself 10 dirt, try placing it, also prevented (except fabric)
  • op myself again
  • able to break/place blocks as normal again

@pop4959 pop4959 merged commit 19b70fe into pop4959:master Aug 12, 2025
1 check passed
@Warriorrrr Warriorrrr deleted the feat/prevent-block-break branch August 12, 2025 06:55
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.

breaking blocks outside of border

2 participants