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

Fix/lectern #579

Merged
merged 13 commits into from Aug 10, 2019
Merged

Fix/lectern #579

merged 13 commits into from Aug 10, 2019

Conversation

ShaneBeee
Copy link

  • Allow all players to read books in lecterns
  • Prevent players without container trust from removing books from/placing books into lectern

References #537

NOTE:
Don't ask me why, maybe a Spigot/Bukkit mistake, but when trying to put a book into a lectern, it calls the BlockPlaceEvent (weird hey?!?)

- Allow all players to read books in lecterns
- Prevent players without container trust from removing books from/placing books into lectern
@Jikoo
Copy link
Collaborator

Jikoo commented Aug 6, 2019

Re: BlockPlaceEvent - I believe it follows the same logic as log stripping, etc. where the block's data is modified even though it isn't necessarily actually placed. I don't think it's a particularly great way to handle it, but it does at least seem somewhat consistent, though it is inconsistent with blocks like note blocks and jukeboxes.

@RoboMWM
Copy link

RoboMWM commented Aug 6, 2019

I believe I filed a bug report re: blockplaceevent. https://hub.spigotmc.org/jira/browse/SPIGOT-4387

Hmm, it's resolved as fixed. Don't recall getting an update about it. Was the PR pulled? I don't have access to see PRs.

@ShaneBeee
Copy link
Author

ShaneBeee commented Aug 6, 2019

I believe I filed a bug report re: blockplaceevent. https://hub.spigotmc.org/jira/browse/SPIGOT-4387

Hmm, it's resolved as fixed. Don't recall getting an update about it. Was the PR pulled? I don't have access to see PRs.

Looks like the PR was never pulled, its still open.
Here is the commit that fixes the bug report you posted. Looks like it just fixed the items but did nothing regarding the action firing of the wrong event

- Changes suggested by Jikoo
@RoboMWM RoboMWM added this to the 16.12 milestone Aug 6, 2019
- Changes requested by Robo
- New config option, to require access trust to read lectern books, true by default
- Changed the note as requested by Robo
- changed field name as requested by Robo
- Add null check for claim itself
- Changes as requested by zedwick
- Changes as requested by zedwick
- Changes as requested by Robo
- Fixed an issue with using clickedBlock.getType() throwing null
Copy link

@RoboMWM RoboMWM 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 at a glance.

@RoboMWM RoboMWM merged commit 7c7e98e into GriefPrevention:master Aug 10, 2019
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.

None yet

4 participants