Glowstone
Glowstone copied to clipboard
Implement EntityDamageByBlockEvent firing
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.
[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'.