Buggy code:
if ( ( zone != null ) && ( ( zone . getTeleport ( ) ) != null ) ) { event . setTo ( zone . getTeleport ( ) ) ; war . msg ( player , ( ( "Welcome<seq2seq4repair_space>to<seq2seq4repair_space>warzone<seq2seq4repair_space>" + ( zone . getName ( ) ) ) + "." ) ) ; return ; } } boolean isLeaving = ( playerWarzone != null ) && ( playerWarzone . getLobby ( ) . isLeavingZone ( playerLoc ) ) ; Team playerTeam = Team . getTeamByPlayerName ( player . getName ( ) ) ; if ( isLeaving ) { if ( playerTeam != null ) { boolean atSpawnAlready = ( ( ( playerTeam . getTeamSpawn ( ) . getBlockX ( ) ) == ( player . getLocation ( ) . getBlockX ( ) ) ) && ( ( playerTeam . getTeamSpawn ( ) . getBlockY ( ) ) == ( player . getLocation ( ) . getBlockY ( ) ) ) ) && ( ( playerTeam . getTeamSpawn ( ) . getBlockZ ( ) ) == ( player . getLocation ( ) . getBlockZ ( ) ) ) ; if ( ! atSpawnAlready ) { playerWarzone . handlePlayerLeave ( player , playerWarzone . getTeleport ( ) , event , true ) ; return ; } } } if ( playerWarzone != null ) { if ( ( ( ( ( locZone == null ) && ( playerTeam != null ) ) && ( ( playerWarzone . getLobby ( ) ) != null ) ) && ( ! ( playerWarzone . getLobby ( ) . getVolume ( ) . contains ( playerLoc ) ) ) ) && ( ! isLeaving ) ) { List < BlockFace > nearestWalls = playerWarzone . getNearestWalls ( playerLoc ) ; war . badMsg ( player , "Use<seq2seq4repair_space>//leave<seq2seq4repair_space>(or<seq2seq4repair_space>//war<seq2seq4repair_space>leave)<seq2seq4repair_space>to<seq2seq4repair_space>exit<seq2seq4repair_space>the<seq2seq4repair_space>zone." ) ; if ( ( nearestWalls != null ) && ( ( nearestWalls . size ( ) ) > 0 ) ) { int northSouthMove = 0 ; int eastWestMove = 0 ; int upDownMove = 0 ; int moveDistance = 1 ; if ( nearestWalls . contains ( NORTH ) ) { northSouthMove += moveDistance ; } else if ( nearestWalls . contains ( SOUTH ) ) { northSouthMove -= moveDistance ; } if ( nearestWalls . contains ( EAST ) ) { eastWestMove += moveDistance ; } else if ( nearestWalls . contains ( WEST ) ) { eastWestMove -= moveDistance ; } if ( nearestWalls . contains ( UP ) ) { upDownMove -= moveDistance ; } else if ( nearestWalls . contains ( DOWN ) ) { event . setTo ( playerTeam . getTeamSpawn ( ) ) ; return ; } event . setTo ( new Location ( playerLoc . getWorld ( ) , ( ( playerLoc . getX ( ) ) + northSouthMove ) , ( ( playerLoc . getY ( ) ) + upDownMove ) , ( ( playerLoc . getZ ( ) ) + eastWestMove ) , playerLoc . getYaw ( ) , playerLoc . getPitch ( ) ) ) ; return ; } else { event . setTo ( playerTeam . getTeamSpawn ( ) ) ; return ; } } if ( ( ! ( playerWarzone . isEnoughPlayers ( ) ) ) && ( ! ( playerTeam . getSpawnVolume ( ) . contains ( playerLoc ) ) ) ) { war . badMsg ( player , ( ( ( ( "Can't<seq2seq4repair_space>leave<seq2seq4repair_space>spawn<seq2seq4repair_space>until<seq2seq4repair_space>there's<seq2seq4repair_space>a<seq2seq4repair_space>minimum<seq2seq4repair_space>of<seq2seq4repair_space>" + ( playerWarzone . getMinPlayers ( ) ) ) + "<seq2seq4repair_space>player(s)<seq2seq4repair_space>on<seq2seq4repair_space>at<seq2seq4repair_space>least<seq2seq4repair_space>" ) + ( playerWarzone . getMinTeams ( ) ) ) + "<seq2seq4repair_space>team(s)." ) ) ; event . setTo ( playerTeam . getTeamSpawn ( ) ) ; return ; } if ( ( ( ( ( playerTeam != null ) && ( playerWarzone . nearAnyOwnedMonument ( playerLoc , playerTeam ) ) ) && ( ( player . getHealth ( ) ) < 20 ) ) && ( ( player . getHealth ( ) ) > 0 ) ) && ( ( this . random . nextInt ( 7 ) ) == 3 ) ) { int currentHp = player . getHealth ( ) ; <START_BUG> int newHp = Math . max ( 20 , ( currentHp + ( locZone . getMonumentHeal ( ) ) ) ) ; <END_BUG> player . setHealth ( newHp ) ; String isS = "s" ; String heartNum = "" ; if ( ( newHp - currentHp ) == 2 ) { isS = "" ; heartNum = "one<seq2seq4repair_space>" ; } else if ( ( newHp - ( currentHp % 2 ) ) == 0 ) { heartNum = ( ( newHp - currentHp ) // 2 ) + "<seq2seq4repair_space>" ; } else { heartNum = ( ( ( newHp - currentHp ) - 1 ) // 2 ) + ".5<seq2seq4repair_space>" ; } war . msg ( player , ( ( ( ( "Your<seq2seq4repair_space>dance<seq2seq4repair_space>pleases<seq2seq4repair_space>the<seq2seq4repair_space>monument's<seq2seq4repair_space>voodoo.<seq2seq4repair_space>You<seq2seq4repair_space>gain<seq2seq4repair_space>" + heartNum ) + "heart" ) + isS ) + "!" ) ) ; return ; } if ( playerWarzone . isFlagThief ( player . getName ( ) ) ) { boolean inSpawn = playerTeam . getSpawnVolume ( ) . contains ( player . getLocation ( ) ) ; boolean inFlag = ( ( playerTeam . getFlagVolume ( ) ) != null ) && ( playerTeam . getFlagVolume ( ) . contains ( player . getLocation ( ) ) ) ; if ( ( playerWarzone . getFlagReturn ( ) ) == ( FlagReturn . BOTH ) ) { if ( ( ! inSpawn ) && ( ! inFlag ) ) { return ; } } else if ( ( playerWarzone . getFlagReturn ( ) ) == ( FlagReturn . SPAWN ) ) { if ( inFlag ) { war . badMsg ( player , "You<seq2seq4repair_space>have<seq2seq4repair_space>to<seq2seq4repair_space>capture<seq2seq4repair_space>the<seq2seq4repair_space>enemy<seq2seq4repair_space>flag<seq2seq4repair_space>at<seq2seq4repair_space>your<seq2seq4repair_space>team's<seq2seq4repair_space>spawn." ) ; return ; } else if ( ! inSpawn ) { return ;

Fix:
int newHp = Math . min ( 20 , ( currentHp + ( locZone . getMonumentHeal ( ) ) ) ) ;