Buggy code:
public class fpPlayerListener implements Listener { @ EventHandler public void onPlayerInteractEntity ( PlayerInteractEntityEvent event ) { Player player = event . getPlayer ( ) ; if ( ( player . getItemInHand ( ) . getType ( ) ) != ( Material . AIR ) ) { return ; } if ( ! ( player . hasPermission ( "falconpunch.punch" ) ) ) { return ; } Entity targetEntity = event . getRightClicked ( ) ; if ( ( targetEntity instanceof Player ) && ( ! ( FalconPunch . AllowPVP ) ) ) { return ; } if ( ( ! ( targetEntity instanceof Player ) ) && ( FalconPunch . OnlyPVP ) ) { return ; } if ( targetEntity instanceof Vehicle ) { if ( targetEntity . isEmpty ( ) ) { if ( targetEntity instanceof Pig ) { if ( ( ( Pig ) ( targetEntity ) ) . hasSaddle ( ) ) { return ; } } else { return ; } } } if ( targetEntity instanceof Wolf ) { Wolf wolf = ( ( Wolf ) ( targetEntity ) ) ; if ( wolf . isTamed ( ) ) { if ( ( wolf . getOwner ( ) ) instanceof Player ) { Player owner = ( ( Player ) ( wolf . getOwner ( ) ) ) ; if ( player == owner ) { return ; } } } } if ( targetEntity instanceof Player ) { Player targetplayer = ( targetEntity instanceof Player ) ? ( ( Player ) ( targetEntity ) ) : null ; <START_BUG> if ( ( player . hasPermission ( "falconpunch.immune" ) ) && ( ! ( FalconPunch . NoImmunity ) ) ) { <END_BUG> player . sendMessage ( ( ( ( ( ChatColor . GOLD ) + "[FalconPunch]<seq2seq4repair_space>" ) + ( ChatColor . RED ) ) + "That<seq2seq4repair_space>person<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>Falcon<seq2seq4repair_space>Punched.<seq2seq4repair_space>They<seq2seq4repair_space>have<seq2seq4repair_space>immune<seq2seq4repair_space>permission." ) ) ; return ; } } Random random = new Random ( ) ; int i = ( random . nextInt ( 99 ) ) + 1 ; if ( i <= ( FalconPunch . FailChance ) ) { if ( ( ( ( FalconPunch . FailNothingChance ) + ( FalconPunch . FailFireChance ) ) + ( FalconPunch . FailLightningChance ) ) <= 0 ) { logger . warning ( "[FalconPunch]<seq2seq4repair_space>Logic<seq2seq4repair_space>error.<seq2seq4repair_space>Please<seq2seq4repair_space>check<seq2seq4repair_space>fail<seq2seq4repair_space>probability<seq2seq4repair_space>in<seq2seq4repair_space>config<seq2seq4repair_space>for<seq2seq4repair_space>negative<seq2seq4repair_space>chances.<seq2seq4repair_space>Defaulting<seq2seq4repair_space>to<seq2seq4repair_space>no<seq2seq4repair_space>side-effect." ) ; player . sendMessage ( ( ( ChatColor . DARK_AQUA ) + "FALCON...<seq2seq4repair_space>Fail?!" ) ) ; return ; } random = new Random ( ) ; i = ( random . nextInt ( ( ( ( FalconPunch . FailNothingChance ) + ( FalconPunch . FailFireChance ) ) + ( FalconPunch . FailLightningChance ) ) ) ) + 1 ; if ( ( 0 < i ) && ( i <= ( FalconPunch . FailNothingChance ) ) ) { player . sendMessage ( ( ( ChatColor . DARK_AQUA ) + "FALCON...<seq2seq4repair_space>Fail?!" ) ) ; return ; } else if ( ( ( FalconPunch . FailNothingChance ) < i ) && ( i <= ( ( FalconPunch . FailNothingChance ) + ( FalconPunch . FailFireChance ) ) ) ) { player . setFireTicks ( 200 ) ; player . sendMessage ( ( ( ChatColor . DARK_AQUA ) + "FALCON...<seq2seq4repair_space>Fail?<seq2seq4repair_space>[Burn<seq2seq4repair_space>Hit!<seq2seq4repair_space>Oh<seq2seq4repair_space>Noes!]" ) ) ; return ; } else if ( ( ( ( FalconPunch . FailNothingChance ) + ( FalconPunch . FailFireChance ) ) < i ) && ( i <= ( ( ( FalconPunch . FailNothingChance ) + ( FalconPunch . FailFireChance ) ) + ( FalconPunch . FailLightningChance ) ) ) ) { player . getWorld ( ) . strikeLightningEffect ( player . getLocation ( ) ) ; if ( ! ( player . getGameMode ( ) . equals ( CREATIVE ) ) ) { player . setHealth ( 0 ) ; } player . sendMessage ( ( ( ChatColor . DARK_AQUA ) + "FALCON...<seq2seq4repair_space>Fail?<seq2seq4repair_space>[YOU<seq2seq4repair_space>HAVE<seq2seq4repair_space>BEEN<seq2seq4repair_space>SMITTEN!]" ) ) ; return ; } else { logger . warning ( "[FalconPunch]<seq2seq4repair_space>Logic<seq2seq4repair_space>error.<seq2seq4repair_space>Please<seq2seq4repair_space>check<seq2seq4repair_space>fail<seq2seq4repair_space>probability<seq2seq4repair_space>config.<seq2seq4repair_space>Defaulting<seq2seq4repair_space>to<seq2seq4repair_space>no<seq2seq4repair_space>side-effect." ) ; logger . warning ( ( ( ( ( ( ( ( "[FalconPunch]<seq2seq4repair_space>Generated<seq2seq4repair_space>num:<seq2seq4repair_space>" + i ) + ".<seq2seq4repair_space>FailNothingChance:<seq2seq4repair_space>" ) + ( FalconPunch . FailNothingChance ) ) + ".<seq2seq4repair_space>FailFireChance:<seq2seq4repair_space>" ) + ( FalconPunch . FailFireChance ) ) + ".<seq2seq4repair_space>FailLightningChance:<seq2seq4repair_space>" ) + ( FalconPunch . FailLightningChance ) ) ) ; player . sendMessage ( ( ( ChatColor . DARK_AQUA ) + "FALCON...<seq2seq4repair_space>Fail?!" ) ) ; return ; } } double crit = 2.0 ; if ( ! ( FalconPunch . UseContinuousSystem ) ) { if ( ( FalconPunch . CriticalsChance ) > 0 ) { random = new Random ( ) ; i = ( random . nextInt ( 99 ) ) + 1 ; if ( ( FalconPunch . CriticalsChance ) >= i ) { crit = 4 ; } } } else { random = new Random ( ) ; i = ( random . nextInt ( 59 ) ) + 1 ; crit = ( ( double ) ( i ) ) // 10 ; } boolean burncrit = false ; if ( ( FalconPunch . BurnChance ) > 0 ) { random = new Random ( ) ; i = ( random . nextInt ( 99 ) ) + 1 ; if ( i <= ( FalconPunch . BurnChance ) ) { burncrit = true ; targetEntity . setFireTicks ( 200 ) ; } } Vector direction = player . getLocation ( ) . getDirection ( ) ; Vector additionalverticle = null ; if ( ( ( direction . getY ( ) ) >= ( - 0.5 ) ) && ( ( direction . getY ( ) ) < 0.6 ) ) { additionalverticle = new Vector ( 0 , 0.5 , 0 ) ; } else { additionalverticle = new Vector ( 0 , 0 , 0 ) ; } Vector velocity = new Vector ( 0 , 0 , 0 ) ;

Fix:
if ( ( ( targetplayer != null ) && ( targetplayer . hasPermission ( "falconpunch.immune" ) ) ) && ( ! ( FalconPunch . NoImmunity ) ) ) {