Buggy code:
public class PKListener implements Listener { ProjectKorra plugin ; public PKListener ( ProjectKorra plugin ) { } public static HashMap < Integer , Integer > noFallEntities = new HashMap < Integer , Integer > ( ) ; public static HashMap < String , Integer > noGrapplePlayers = new HashMap < String , Integer > ( ) ; @ EventHandler ( priority = EventPriority . LOWEST , ignoreCancelled = true ) public void onEntityDamageByBlock ( EntityDamageByBlockEvent event ) { } @ EventHandler public void onHorizontalCollision ( HorizontalVelocityChangeEvent e ) { if ( ( e . getEntity ( ) ) instanceof LivingEntity ) { <START_BUG> ( ( LivingEntity ) ( e . getEntity ( ) ) ) . damage ( ( ( e . getDifference ( ) . length ( ) ) * 2 ) , e . getInstigator ( ) ) ; <END_BUG> } } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onPlayerGrapple ( PlayerGrappleEvent event ) { } @ EventHandler ( priority = EventPriority . HIGHEST , ignoreCancelled = true ) public void onProjectileHit ( ProjectileHitEvent event ) { } @ EventHandler ( priority = EventPriority . HIGHEST ) public void fishEvent ( PlayerFishEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onPlayerInteraction ( PlayerInteractEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onBlockPlace ( BlockPlaceEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onBlockFlowTo ( BlockFromToEvent event ) { } @ EventHandler public void onPlayerJoin ( PlayerJoinEvent e ) { } @ EventHandler public void onPlayerQuit ( PlayerQuitEvent event ) { } @ EventHandler public void playerIsKicked ( PlayerKickEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onPlayerSneak ( PlayerToggleSneakEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onBlockIgnite ( BlockIgniteEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onPlayerMove ( PlayerMoveEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onEntityTargetLiving ( EntityTargetLivingEntityEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onTarget ( EntityTargetEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onEntityChangeBlockEvent ( EntityChangeBlockEvent event ) { } @ EventHandler ( priority = EventPriority . HIGH , ignoreCancelled = true ) public void onEntityExplode ( EntityExplodeEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onEntityExplodeEvent ( EntityExplodeEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onEntityInteractEvent ( EntityInteractEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onEntityShootBowEvent ( EntityShootBowEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onEntityTeleportEvent ( EntityTeleportEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onEntityProjectileLaunchEvent ( ProjectileLaunchEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onEntitySlimeSplitEvent ( SlimeSplitEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onPlayerSwing ( PlayerAnimationEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onInventoryClick ( InventoryClickEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onPlayerDeath ( PlayerDeathEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onPlayerToggleFlight ( PlayerToggleFlightEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onEntityCombust ( EntityCombustEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onEntityDamageBlock ( EntityDamageByBlockEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onEntityDamageEvent ( EntityDamageEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onBlockMeltEvent ( BlockFadeEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onBlockBreak ( BlockBreakEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onPlayerChat ( AsyncPlayerChatEvent event ) { } @ EventHandler public void onEntitySuffocatedByTempBlocks ( EntityDamageEvent event ) { } @ EventHandler public void onPlayerDamageByPlayer ( EntityDamageByEntityEvent e ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onPlayerDamage ( EntityDamageEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onBlockPhysics ( BlockPhysicsEvent event ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onBlockForm ( BlockFormEvent event ) { } }

Fix:
Methods . damageEntity ( e . getInstigator ( ) , e . getEntity ( ) , ( ( e . getDifference ( ) . length ( ) ) * 2 ) ) ;