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

Fixes potion splash pvp check #1230

Merged
merged 1 commit into from
Mar 18, 2020
Merged

Conversation

kennytv
Copy link
Contributor

@kennytv kennytv commented Mar 16, 2020

Before this change, the entire potion splash would be cancelled if a single protected player would have been affected. Now, it will only remove the protected players themselves from the affected list.

This also ignores the player itself (!le.getUniqueId().equals(user.getUniqueId()), since I wasn't sure whether that is included with the pvp check - if it's not desired, I will remove it again

(Another probably unintended sideeffect of the old code was that it would uncancel events that had potentially been cancelled by another plugin earlier, so this is fixed as well)

Before this change, the entire potion splash would be cancelled if a single protected player would have been affected. Now, it will only remove the protected players themselves from the affected list.
@Poslovitch Poslovitch self-requested a review March 16, 2020 10:34
@Poslovitch Poslovitch added Status: Need review Waiting for a review to be made on this Pull Request Type: Bug labels Mar 16, 2020
@Poslovitch Poslovitch added this to the 1.12.0 milestone Mar 16, 2020
@Poslovitch Poslovitch added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: Need review Waiting for a review to be made on this Pull Request labels Mar 18, 2020
@Poslovitch Poslovitch changed the title Fixes potion splash pvp check. Fixes potion splash pvp check Mar 18, 2020
@Poslovitch Poslovitch merged commit 706bed6 into BentoBoxWorld:develop Mar 18, 2020
@Poslovitch
Copy link
Member

Thanks for the PR!

tastybento added a commit that referenced this pull request Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants