Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change BREAK_BLOCK to PLACE_BLOCK in BlockPlaceEvent #3944

Merged
merged 1 commit into from
Aug 26, 2023

Conversation

iTwins
Copy link
Contributor

@iTwins iTwins commented Aug 11, 2023

Description

The PlaceBlockEvent was logging block breaks

Proposed changes

change Interaction.BREAK_BLOCK to Interaction.PLACE_BLOCK

Related Issues (if applicable)

N/A

Checklist

  • I have fully tested the proposed changes and promise that they will not break everything into chaos.
  • I have also tested the proposed changes in combination with various popular addons and can confirm my changes do not break them.
  • I have made sure that the proposed changes do not break compatibility across the supported Minecraft versions (1.16.* - 1.20.*).
  • I followed the existing code standards and didn't mess up the formatting.
  • I did my best to add documentation to any public classes or methods I added.
  • I have added Nonnull and Nullable annotations to my methods to indicate their behaviour for null values
  • I added sufficient Unit Tests to cover my code.

@iTwins iTwins requested a review from a team as a code owner August 11, 2023 21:31
@github-actions github-actions bot added the ✨ Fix This Pull Request fixes an issue. label Aug 11, 2023
@github-actions
Copy link
Contributor

Your Pull Request was automatically labelled as: "✨ Fix"
Thank you for contributing to this project! ❤️

@github-actions
Copy link
Contributor

Slimefun preview build

A Slimefun preview build is available for testing!
Commit: 2cb0d637

https://preview-builds.walshy.dev/download/Slimefun/3944/2cb0d637

Note: This is not a supported build and is only here for the purposes of testing.
Do not run this on a live server and do not report bugs anywhere but this PR!

Copy link
Contributor

@JustAHuman-xD JustAHuman-xD left a comment

Choose a reason for hiding this comment

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

I can't believe this hasn't been noticed for so long xd

@JustAHuman-xD JustAHuman-xD added the 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. label Aug 12, 2023
@JustAHuman-xD
Copy link
Contributor

It would also be good if we can get some testing to make sure this change is the proper functionality

@J3fftw1
Copy link
Contributor

J3fftw1 commented Aug 12, 2023

I did notice this before but thought it was intentional and didn’t give it any thoughts

@Sefiraat
Copy link
Member

It’s likely gone unnoticed because the permissions for breaking and placing normally both go hand-in-hand and for those few servers with a specific distinction it’s less likely someone would trigger the behaviour in the incorrect manner like this.

Copy link
Member

@Sefiraat Sefiraat left a comment

Choose a reason for hiding this comment

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

Pending removal of the resting label, looking good

Copy link
Member

@TheBusyBiscuit TheBusyBiscuit left a comment

Choose a reason for hiding this comment

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

good catch 👍🏻

@TheBusyBiscuit
Copy link
Member

It would also be good if we can get some testing to make sure this change is the proper functionality

I don't see the need for testing this as it is mainly just passing the data onto other plugins.
Besides, in dough everything is try/catch wrapped anyway and it will log any issues with its protection modules should there be a problem.

However, I noticed that our dough Logblock module does not implement block placement yet:
https://github.com/baked-libs/dough/blob/main/dough-protection/src/main/java/io/github/bakedlibs/dough/protection/loggers/LogBlockLogger.java#L28-L35
So that should be changed, otherwise only CoreProtect users will notice any difference after this change.

This PR however can be merged in my opinion if that's okay with you.

@Sfiguz7 Sfiguz7 merged commit 4c1da3c into Slimefun:master Aug 26, 2023
12 checks passed
@iTwins iTwins deleted the fix/protection_manager_place_block branch August 26, 2023 15:32
@variananora variananora removed the 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. label Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Fix This Pull Request fixes an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants