Glowstone icon indicating copy to clipboard operation
Glowstone copied to clipboard

Implement EntityDamageByBlockEvent firing

Open ytnoos opened this issue 5 years ago • 2 comments

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.

ytnoos avatar Oct 24 '19 10:10 ytnoos

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 24 '19 10:10 CLAassistant

[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'.

mastercoms avatar Nov 08 '19 15:11 mastercoms