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

Implement EntityDamageByBlockEvent firing #1065

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open

Implement EntityDamageByBlockEvent firing #1065

wants to merge 8 commits into from

Conversation

ytnoos
Copy link

@ytnoos ytnoos commented Oct 24, 2019

I created the new method getTouchingBlocks() to get every block a player was colliding with to put it on the EntityDamageByBlockEvent.

I created the canTakeDamage() method without any parameters to avoid code duplication on the new damageBlock() method.

I implemented[ damageBlock() method because default damage LivingEntity's method does not allow Blocks as a damage source.

@CLAassistant
Copy link

CLAassistant commented Oct 24, 2019

CLA assistant check
All committers have signed the CLA.

@ytnoos ytnoos requested a review from mastercoms November 6, 2019 21:31
@ytnoos ytnoos requested a review from mastercoms November 7, 2019 18:53
Copy link
Member

@mastercoms mastercoms left a comment

Choose a reason for hiding this comment

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

Could you fix the checkstyle errors as reported by our CI? The rest LGTM.

@ytnoos ytnoos requested a review from mastercoms November 7, 2019 21:11
@mastercoms
Copy link
Member

[ERROR] src/main/java/net/glowstone/entity/GlowLivingEntity.java:[77] (imports) CustomImportOrder: Wrong lexicographical order for 'org.bukkit.event.entity.EntityDamageByBlockEvent' import. Should be before 'org.bukkit.event.entity.EntityDamageByEntityEvent'.
[ERROR] src/main/java/net/glowstone/entity/GlowLivingEntity.java:[1019] (coding) OverloadMethodsDeclarationOrder: Overload methods should not be split. Previous overloaded method located at line '965'.

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